X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zutil%2Fotherinfo.c;h=9ee855068a9c2b4d8e37d893287f44e630c9dead;hb=854bc0025cf4f8cbd509e2d1de7d2f8a1ea126ac;hp=629fea9712382e48d9bb8ae966e715d00b928ebd;hpb=b61bad92f2725995d69732d46361638b8a101c27;p=yaz-moved-to-github.git diff --git a/zutil/otherinfo.c b/zutil/otherinfo.c index 629fea9..9ee8550 100644 --- a/zutil/otherinfo.c +++ b/zutil/otherinfo.c @@ -1,24 +1,15 @@ /* - * Copyright (c) 1999, Index Data + * Copyright (c) 1999-2003, Index Data * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * - * $Log: otherinfo.c,v $ - * Revision 1.2 1999-09-13 12:51:35 adam - * Fixed bug in yaz_oi_update and added delete option. - * - * Revision 1.1 1999/06/08 10:10:16 adam - * New sub directory zutil. Moved YAZ Compiler to be part of YAZ tree. - * - * Revision 1.1 1999/04/26 07:25:25 adam - * Implemented OtherInfo utility. - * + * $Id: otherinfo.c,v 1.7 2003-01-06 08:20:29 adam Exp $ */ #include #include -#include +#include void yaz_oi_APDU(Z_APDU *apdu, Z_OtherInformation ***oip) { @@ -39,6 +30,12 @@ void yaz_oi_APDU(Z_APDU *apdu, Z_OtherInformation ***oip) case Z_APDU_scanRequest: *oip = &apdu->u.scanRequest->otherInfo; break; + case Z_APDU_extendedServicesRequest: + *oip = &apdu->u.extendedServicesRequest->otherInfo; + break; + case Z_APDU_deleteResultSetRequest: + *oip = &apdu->u.deleteResultSetRequest->otherInfo; + break; case Z_APDU_initResponse: *oip = &apdu->u.initResponse->otherInfo; break; @@ -54,6 +51,18 @@ void yaz_oi_APDU(Z_APDU *apdu, Z_OtherInformation ***oip) case Z_APDU_scanResponse: *oip = &apdu->u.scanResponse->otherInfo; break; + case Z_APDU_extendedServicesResponse: + *oip = &apdu->u.extendedServicesResponse->otherInfo; + break; + case Z_APDU_deleteResultSetResponse: + *oip = &apdu->u.deleteResultSetResponse->otherInfo; + break; + case Z_APDU_duplicateDetectionRequest: + *oip = &apdu->u.duplicateDetectionRequest->otherInfo; + break; + case Z_APDU_duplicateDetectionResponse: + *oip = &apdu->u.duplicateDetectionResponse->otherInfo; + break; default: *oip = 0; break; @@ -65,7 +74,11 @@ Z_OtherInformationUnit *yaz_oi_update ( int *oid, int categoryValue, int delete_flag) { int i; - Z_OtherInformation *otherInformation = *otherInformationP; + Z_OtherInformation *otherInformation; + + if (!otherInformationP) + return 0; + otherInformation = *otherInformationP; if (!otherInformation) { if (!odr)