yaz_oi_set_string_oid(oi, out, yaz_oid_userinfo_cookie,
1, c->cookie_out);
}
- if (c->client_IP)
+ if (c->client_IP && a->which == Z_APDU_initRequest)
{
Z_OtherInformation **oi;
yaz_oi_APDU(a, &oi);
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);
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;
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 */