X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=asn%2Fzget.c;h=d4991e93ff63d0b7c6733446282a00f4587faa33;hp=71477d0e6a2cbc81e0eea8eb837416abf69972e1;hb=c2af22077779cd65b746b2822b2b1478ea0619fe;hpb=a8cbf4e58821b5a7e64063f6a1b50c453494167f diff --git a/asn/zget.c b/asn/zget.c index 71477d0..d4991e9 100644 --- a/asn/zget.c +++ b/asn/zget.c @@ -4,7 +4,19 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: zget.c,v $ - * Revision 1.1 1995-05-22 11:30:20 quinn + * Revision 1.5 1995-06-07 14:42:30 quinn + * Fixed CLOSE + * + * Revision 1.4 1995/06/07 14:36:25 quinn + * Added CLOSE + * + * Revision 1.3 1995/06/05 10:52:06 quinn + * Fixed some negligences. + * + * Revision 1.2 1995/05/30 10:15:49 quinn + * Added our implementor's ID + * + * Revision 1.1 1995/05/22 11:30:20 quinn * Adding Z39.50-1992 stuff to proto.c. Adding zget.c * * @@ -27,7 +39,7 @@ Z_InitRequest *zget_InitRequest(ODR o) r->maximumRecordSize = odr_malloc(o, sizeof(int)); *r->maximumRecordSize = 30*1024; r->idAuthentication = 0; - r->implementationId = "YAZ"; + r->implementationId = "YAZ (id=81)"; r->implementationName = "Index Data/YAZ"; r->implementationVersion = YAZ_VERSION; r->userInformationField = 0; @@ -47,8 +59,10 @@ Z_InitResponse *zget_InitResponse(ODR o) *r->preferredMessageSize = 30*1024; r->maximumRecordSize = odr_malloc(o, sizeof(int)); *r->maximumRecordSize = 30*1024; - r->implementationId = "YAZ"; - r->implementationName = "Index Data YAZ Z39.50/SR implementation"; + r->result = odr_malloc(o, sizeof(bool_t)); + *r->result = 1; + r->implementationId = "YAZ (id=81)"; + r->implementationName = "Index Data/YAZ"; r->implementationVersion = YAZ_VERSION; r->userInformationField = 0; return r; @@ -244,6 +258,19 @@ Z_AccessControlResponse *zget_AccessControlResponse(ODR o) return r; } +Z_Close *zget_Close(ODR o) +{ + Z_Close *r = odr_malloc(o, sizeof(*r)); + + r->referenceId = 0; + r->closeReason = odr_malloc(o, sizeof(int)); + *r->closeReason = Z_Close_finished; + r->diagnosticInformation = 0; + r->resourceReportFormat = 0; + r->resourceReport = 0; + return r; +} + Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which) { Z_APDU *r = odr_malloc(o, sizeof(*r)); @@ -280,6 +307,9 @@ Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which) case Z_APDU_resourceControlResponse: r->u.resourceControlResponse = zget_ResourceControlResponse(o); break; + case Z_APDU_close: + r->u.close = zget_Close(o); + break; default: fprintf(stderr, "Bad APDU-type to zget_APDU"); exit(1);