X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fzoom-z3950.c;h=701f5a4e0dcab7d05e47b84182b409cfe421ae1a;hp=8afcd01ef60273043795f4a6dda17a1082ef5a4a;hb=6533da485c4fcf4bc1bb6d70d0b18b13602381ff;hpb=480f849f7e012d2d742d2d1dffbd1b0691dcd33a diff --git a/src/zoom-z3950.c b/src/zoom-z3950.c index 8afcd01..701f5a4 100644 --- a/src/zoom-z3950.c +++ b/src/zoom-z3950.c @@ -609,7 +609,7 @@ zoom_ret ZOOM_connection_Z3950_send_init(ZOOM_connection c) auth->u.open = odr_strdup(c->odr_out, c->user); ireq->idAuthentication = auth; } - if (c->proxy) + if (c->proxy_mode) { yaz_oi_set_string_oid(&ireq->otherInfo, c->odr_out, yaz_oid_userinfo_proxy, 1, c->host_port); @@ -1554,7 +1554,7 @@ zoom_ret ZOOM_connection_Z3950_search(ZOOM_connection c) ZOOM_resultset resultset; int *start, *count; - if (!c->tasks) + if (!c->tasks || c->tasks->which == ZOOM_TASK_SORT) return zoom_complete; assert(c->tasks->which == ZOOM_TASK_SEARCH); resultset = c->tasks->u.search.resultset; @@ -1577,9 +1577,10 @@ zoom_ret ZOOM_connection_Z3950_search(ZOOM_connection c) if (resultset->live_set) { - if (*start + *count > resultset->size) - ZOOM_set_dset_error(c, YAZ_BIB1_PRESENT_REQUEST_OUT_OF_RANGE, "Bib-1", - 0, 0); + if (*start >= resultset->size) + *count = 0; + else if (*start + *count >= resultset->size) + *count = resultset->size - *start; } if (c->error) /* don't continue on error */