X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=zutil%2Fotherinfo.c;h=db8e0a1e1759caea99d6dc21eff339e399d7d786;hp=629fea9712382e48d9bb8ae966e715d00b928ebd;hb=db9768c3988f9536c898250880c13923a2dde32d;hpb=b61bad92f2725995d69732d46361638b8a101c27 diff --git a/zutil/otherinfo.c b/zutil/otherinfo.c index 629fea9..db8e0a1 100644 --- a/zutil/otherinfo.c +++ b/zutil/otherinfo.c @@ -1,10 +1,20 @@ /* - * Copyright (c) 1999, Index Data + * Copyright (c) 1999-2001, 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 + * Revision 1.5 2001-09-24 21:51:56 adam + * New Z39.50 OID utilities: yaz_oidval_to_z3950oid, yaz_str_to_z3950oid + * and yaz_z3950oid_to_str. + * + * Revision 1.4 1999/11/30 13:47:12 adam + * Improved installation. Moved header files to include/yaz. + * + * Revision 1.3 1999/11/10 09:06:40 adam + * Fixed yaz_oi_update so that it ignores NULL pointer. + * + * 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 @@ -18,7 +28,7 @@ #include #include -#include +#include void yaz_oi_APDU(Z_APDU *apdu, Z_OtherInformation ***oip) { @@ -39,6 +49,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 +70,12 @@ 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; default: *oip = 0; break; @@ -65,7 +87,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)