From acc7723b7d7d6cd3e63866354c8878d0aa21694f Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 13 Jan 2000 23:05:50 +0000 Subject: [PATCH] Fixed tagging for member requester-CHECKED-IN in ILL ASN.1 spec. --- CHANGELOG | 3 +++ ill/ill9702.asn | 2 +- ztest/ztest.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 52 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 68e0f63..8c6a3e6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ Possible compatibility problems with earlier versions marked with '*'. +For ILL, fixed tagging problem for member requester-CHECKED-IN in +type Requester-Optional-Messages-Type. + Added several OID's. Changed retrieval module so that we can load records with no abstract diff --git a/ill/ill9702.asn b/ill/ill9702.asn index f902e42..e947489 100644 --- a/ill/ill9702.asn +++ b/ill/ill9702.asn @@ -904,7 +904,7 @@ Requester-Optional-Messages-Type ::= SEQUENCE { desires (2), neither (3) }, - requester-CHECKED-IN [2] IMPLICIT ENUMERATED { + requester-CHECKED-IN [3] IMPLICIT ENUMERATED { requires (1), desires (2), neither (3) diff --git a/ztest/ztest.c b/ztest/ztest.c index cd6d186..a2164d7 100644 --- a/ztest/ztest.c +++ b/ztest/ztest.c @@ -6,7 +6,10 @@ * Chas Woodfield, Fretwell Downing Datasystems. * * $Log: ztest.c,v $ - * Revision 1.29 2000-01-12 14:36:07 adam + * Revision 1.30 2000-01-13 23:05:50 adam + * Fixed tagging for member requester-CHECKED-IN in ILL ASN.1 spec. + * + * Revision 1.29 2000/01/12 14:36:07 adam * Added printing stream (ODR) for backend functions. * * Revision 1.28 1999/12/16 23:36:19 adam @@ -199,22 +202,63 @@ 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; if (r->direct_reference) { oident *ent = oid_getentbyoid(r->direct_reference); if (ent) - yaz_log(LOG_LOG, "ItemRequest %s", ent->desc); + yaz_log(LOG_LOG, "OID %s", ent->desc); if (ent && ent->value == VAL_ISO_ILL_1) { + yaz_log (LOG_LOG, "ItemRequest"); if (r->which == ODR_EXTERNAL_single) { odr_setbuf(rr->decode, r->u.single_ASN1_type->buf, r->u.single_ASN1_type->len, 0); - ill_ItemRequest (rr->decode, &item_req, 0, 0); + if (!ill_ItemRequest (rr->decode, &item_req, 0, 0)) + { + yaz_log (LOG_LOG, + "Couldn't decode ItemRequest %s near %d", + odr_errmsg(odr_geterror(rr->decode)), + odr_offset(rr->decode)); + yaz_log(LOG_LOG, "PDU dump:"); + odr_dumpBER(log_file(), + r->u.single_ASN1_type->buf, + r->u.single_ASN1_type->len); + } + if (rr->print) + { + ill_ItemRequest (rr->print, &item_req, 0, + "ItemRequest"); + odr_reset (rr->print); + } + } + if (!item_req && r->which == ODR_EXTERNAL_single) + { + yaz_log (LOG_LOG, "ILLRequest"); + 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)) + { + yaz_log (LOG_LOG, + "Couldn't decode ILLRequest %s near %d", + odr_errmsg(odr_geterror(rr->decode)), + odr_offset(rr->decode)); + yaz_log(LOG_LOG, "PDU dump:"); + odr_dumpBER(log_file(), + r->u.single_ASN1_type->buf, + r->u.single_ASN1_type->len); + } if (rr->print) - ill_ItemRequest (rr->print, &item_req, 0, 0); + { + ill_Request (rr->print, &ill_req, 0, + "ILLRequest"); + odr_reset (rr->print); + } } } } -- 1.7.10.4