diff options
author | Adam Dickmeiss <dickmeiss@php.net> | 2002-01-01 14:09:03 +0000 |
---|---|---|
committer | Adam Dickmeiss <dickmeiss@php.net> | 2002-01-01 14:09:03 +0000 |
commit | a1432aa89ac7412d334c4002b2bc2123245ab329 (patch) | |
tree | 3991e2cfee8be225dff5d3055a6a0b68396af091 /ext/yaz/php_yaz.c | |
parent | 3cb2be5fc0243c636475161b4cc125e37eff4794 (diff) | |
download | php-git-a1432aa89ac7412d334c4002b2bc2123245ab329.tar.gz |
Removal of non-essential parameters for non-piggyback search.
Diffstat (limited to 'ext/yaz/php_yaz.c')
-rw-r--r-- | ext/yaz/php_yaz.c | 30 |
1 files changed, 11 insertions, 19 deletions
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); |