X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ztest%2Fztest.c;h=f6c63720947ed0f45f00d7d1b3a3b86af4e5941f;hb=e5324215018e129dd19734acd0e683e5af748423;hp=d10e4b50101151cac331b072c442344ffd07f2d9;hpb=1e05ad915933124916c16e164cd2065646379cd7;p=yaz-moved-to-github.git diff --git a/ztest/ztest.c b/ztest/ztest.c index d10e4b5..f6c6372 100644 --- a/ztest/ztest.c +++ b/ztest/ztest.c @@ -6,7 +6,13 @@ * Chas Woodfield, Fretwell Downing Datasystems. * * $Log: ztest.c,v $ - * Revision 1.36 2001-01-30 21:34:18 adam + * Revision 1.38 2001-02-21 13:46:54 adam + * C++ fixes. + * + * 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 @@ -205,7 +211,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); @@ -217,7 +223,7 @@ int ztest_esrequest (void *handle, bend_esrequest_rr *rr) if (r->which == ODR_EXTERNAL_single) { odr_setbuf(rr->decode, - r->u.single_ASN1_type->buf, + (char *) r->u.single_ASN1_type->buf, r->u.single_ASN1_type->len, 0); if (!ill_ItemRequest (rr->decode, &item_req, 0, 0)) @@ -244,28 +250,28 @@ 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, + (char*) 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:"); odr_dumpBER(yaz_log_file(), - r->u.single_ASN1_type->buf, + (char *) r->u.single_ASN1_type->buf, 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); } }