From: Adam Dickmeiss Date: Tue, 1 Jan 2002 14:09:03 +0000 (+0000) Subject: Removal of non-essential parameters for non-piggyback search. X-Git-Tag: PRE_ISSET_PATCH~340 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1432aa89ac7412d334c4002b2bc2123245ab329;p=php Removal of non-essential parameters for non-piggyback search. --- diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index a9fc74784e..ae31966f19 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -764,6 +764,7 @@ static int send_search (Yaz_Association t) /* resultSetPrepare (req, t, req->cur_pa); */ if (t->resultSetStartPoint == 1 && t->piggyback && + t->numberOfRecordsRequested && (t->sort_criteria == 0 || *t->sort_criteria == 0) ) { sreq->largeSetLowerBound = odr_malloc (t->odr_out, sizeof(int)); @@ -779,27 +780,18 @@ static int send_search (Yaz_Association t) sreq->mediumSetElementSetNames = esn; sreq->smallSetElementSetNames = esn; } - } - else - { - sreq->smallSetUpperBound = odr_malloc (t->odr_out, sizeof(int)); - *sreq->smallSetUpperBound = 0; - sreq->largeSetLowerBound = odr_malloc (t->odr_out, sizeof(int)); - *sreq->largeSetLowerBound = 1; - sreq->mediumSetPresentNumber = odr_malloc (t->odr_out, sizeof(int)); - *sreq->mediumSetPresentNumber = 0; - } - sreq->query = r->query; - if (t->preferredRecordSyntax && *t->preferredRecordSyntax) - { - struct oident ident; + if (t->preferredRecordSyntax && *t->preferredRecordSyntax) + { + struct oident ident; - ident.proto = PROTO_Z3950; - ident.oclass = CLASS_RECSYN; - ident.value = oid_getvalbyname (t->preferredRecordSyntax); - sreq->preferredRecordSyntax = - odr_oiddup (t->odr_out, oid_getoidbyent (&ident)); + ident.proto = PROTO_Z3950; + ident.oclass = CLASS_RECSYN; + ident.value = oid_getvalbyname (t->preferredRecordSyntax); + sreq->preferredRecordSyntax = + odr_oiddup (t->odr_out, oid_getoidbyent (&ident)); + } } + sreq->query = r->query; sreq->databaseNames = set_DatabaseNames (t, &sreq->num_databaseNames); send_APDU (t, apdu);