X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=ztest%2Fztest.c;h=c3df75a7f61fc74669597543b23fe7cdd5715a28;hb=9f6bbd483ea92b4a5ae114a36bfebd942e138460;hp=fa749d6cd3d08c6d73c04eb45b0f5f3ab8edaadc;hpb=8e4eabe621f8b8195faa6625a38a2e1ae7b68aa1;p=yaz-moved-to-github.git diff --git a/ztest/ztest.c b/ztest/ztest.c index fa749d6..c3df75a 100644 --- a/ztest/ztest.c +++ b/ztest/ztest.c @@ -1,12 +1,18 @@ /* - * Copyright (c) 1995-2000, Index Data. + * Copyright (c) 1995-2001, Index Data. * See the file LICENSE for details. * * NT Service interface by * Chas Woodfield, Fretwell Downing Datasystems. * * $Log: ztest.c,v $ - * Revision 1.35 2000-11-23 10:58:33 adam + * Revision 1.37 2001-02-20 11:25:32 adam + * Added ill_get_APDU and ill_get_Cancel. + * + * Revision 1.36 2001/01/30 21:34:18 adam + * Added step-size for Scan backend interface. + * + * Revision 1.35 2000/11/23 10:58:33 adam * SSL comstack support. Separate POSIX thread support library. * * Revision 1.34 2000/09/04 08:58:15 adam @@ -202,7 +208,7 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr) { Z_External *r = (Z_External*) n->itemRequest; ILL_ItemRequest *item_req = 0; - ILL_Request *ill_req = 0; + ILL_APDU *ill_apdu = 0; if (r->direct_reference) { oident *ent = oid_getentbyoid(r->direct_reference); @@ -241,15 +247,15 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr) } if (!item_req && r->which == ODR_EXTERNAL_single) { - yaz_log (LOG_LOG, "Decode ILLRequest begin"); + yaz_log (LOG_LOG, "Decode ILL APDU begin"); odr_setbuf(rr->decode, r->u.single_ASN1_type->buf, r->u.single_ASN1_type->len, 0); - if (!ill_Request (rr->decode, &ill_req, 0, 0)) + if (!ill_APDU (rr->decode, &ill_apdu, 0, 0)) { yaz_log (LOG_LOG, - "Couldn't decode ILLRequest %s near %d", + "Couldn't decode ILL APDU %s near %d", odr_errmsg(odr_geterror(rr->decode)), odr_offset(rr->decode)); yaz_log(LOG_LOG, "PDU dump:"); @@ -258,11 +264,11 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr) r->u.single_ASN1_type->len); } else - yaz_log(LOG_LOG, "Decode ILLRequest OK"); + yaz_log(LOG_LOG, "Decode ILL APDU OK"); if (rr->print) { - ill_Request (rr->print, &ill_req, 0, - "ILLRequest"); + ill_APDU (rr->print, &ill_apdu, 0, + "ILL APDU"); odr_reset (rr->print); } } @@ -550,6 +556,11 @@ int ztest_scan(void *handle, bend_scan_rr *q) q->errcode = 229; /* unsupported term type */ return 0; } + if (*q->step_size != 0) + { + q->errcode = 205; /*Only zero step size supported for Scan */ + return 0; + } if (q->term->term->u.general->len >= 80) { q->errcode = 11; /* term too long */