X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zutil%2Fzoom-c.c;h=a414e45abdeeffe64c472f6b5552726e5d81d7c2;hb=c620a713f1418315efcd4e6fab225e036775d365;hp=cf5b67f9151fb60c3da35a1a79231f5e7c253e09;hpb=4d531a1a9131d69c3b6c27fbac42837e22cff61c;p=yaz-moved-to-github.git diff --git a/zutil/zoom-c.c b/zutil/zoom-c.c index cf5b67f..a414e45 100644 --- a/zutil/zoom-c.c +++ b/zutil/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-2003, Index Data * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.13 2003-01-06 08:20:29 adam Exp $ + * $Id: zoom-c.c,v 1.17 2003-02-12 15:06:44 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -401,8 +401,6 @@ ZOOM_API(int) ZOOM_query_cql(ZOOM_query s, const char *str) { Z_External *ext; - char *buf; - int len; ext = (Z_External *) odr_malloc(s->odr, sizeof(*ext)); ext->direct_reference = odr_getoidbystr(s->odr, "1.2.840.10003.16.2"); @@ -958,9 +956,9 @@ static zoom_ret ZOOM_connection_send_search (ZOOM_connection c) { /* Regular piggyback - do it unless we're going to do sort */ *search_req->largeSetLowerBound = 2000000000; - *search_req->smallSetUpperBound = r->count; + *search_req->smallSetUpperBound = 0; *search_req->mediumSetPresentNumber = r->count; - smallSetElementSetName = 0; /* no need to provide this */ + smallSetElementSetName = 0; } else { @@ -1582,14 +1580,15 @@ static zoom_ret send_present (ZOOM_connection c) compo->u.complex->generic = (Z_Specification *) odr_malloc(c->odr_out, sizeof(*compo->u.complex->generic)); - compo->u.complex->generic->schema = (Odr_oid *) + compo->u.complex->generic->which = Z_Specification_oid; + compo->u.complex->generic->u.oid = (Odr_oid *) yaz_str_to_z3950oid (c->odr_out, CLASS_SCHEMA, schema); - if (!compo->u.complex->generic->schema) + if (!compo->u.complex->generic->u.oid) { /* OID wasn't a schema! Try record syntax instead. */ - compo->u.complex->generic->schema = (Odr_oid *) + compo->u.complex->generic->u.oid = (Odr_oid *) yaz_str_to_z3950oid (c->odr_out, CLASS_RECSYN, schema); } if (elementSetName && *elementSetName) @@ -2745,7 +2744,7 @@ ZOOM_event (int no, ZOOM_connection *cs) { ZOOM_Event event = ZOOM_Event_create(ZOOM_EVENT_TIMEOUT); /* timeout and this connection was waiting */ - set_ZOOM_error(c, ZOOM_ERROR_TIMEOUT); + set_ZOOM_error(c, ZOOM_ERROR_TIMEOUT, 0); do_close (c); yaz_log (LOG_DEBUG, "timeout"); ZOOM_connection_put_event(c, event);