X-Git-Url: http://git.indexdata.com/?p=yazpp-moved-to-github.git;a=blobdiff_plain;f=src%2Fyaz-z-server-ill.cpp;h=fbe05d9f2c3538301a8f3d2bbfe04d6d58d45e02;hp=063c2a8b5e587ca3dd7d5ebbd8de8e14a716cc1d;hb=ba7a7aa994136b9bb5b775ad84192f96259bd9c0;hpb=ce735e1c32f736035580b9b14f32e6d1319ee06b diff --git a/src/yaz-z-server-ill.cpp b/src/yaz-z-server-ill.cpp index 063c2a8..fbe05d9 100644 --- a/src/yaz-z-server-ill.cpp +++ b/src/yaz-z-server-ill.cpp @@ -3,7 +3,10 @@ * See the file LICENSE for details. * * $Log: yaz-z-server-ill.cpp,v $ - * Revision 1.3 2001-04-03 14:37:19 adam + * Revision 1.4 2001-04-04 14:02:49 adam + * URSULA / Z-ruth service. + * + * Revision 1.3 2001/04/03 14:37:19 adam * More work ILL-service. * * Revision 1.2 2001/03/29 15:14:26 adam @@ -17,55 +20,6 @@ #include #include -/* - * database record. - */ -void Yaz_Facility_ILL::create_databaseRecord ( - Z_NamePlusRecord *rec, const char *dbname, int format, - const void *buf, int len) -{ - rec->databaseName = dbname ? odr_strdup (m_odr, dbname) : 0; - rec->which = Z_NamePlusRecord_databaseRecord; - rec->u.databaseRecord = z_ext_record (m_odr, format, - (const char *) buf, len); -} - -/* - * surrogate diagnostic. - */ -void Yaz_Facility_ILL::create_surrogateDiagnostics( - Z_NamePlusRecord *rec, const char *dbname, int error, char *const addinfo) -{ - int oid[OID_SIZE]; - int *err = (int *)odr_malloc (m_odr, sizeof(*err)); - oident bib1; - Z_DiagRec *drec = (Z_DiagRec *)odr_malloc (m_odr, sizeof(*drec)); - Z_DefaultDiagFormat *dr = (Z_DefaultDiagFormat *) - odr_malloc (m_odr, sizeof(*dr)); - - bib1.proto = PROTO_Z3950; - bib1.oclass = CLASS_DIAGSET; - bib1.value = VAL_BIB1; - - yaz_log(LOG_DEBUG, "SurrogateDiagnotic: %d -- %s", error, addinfo); - *err = error; - rec->databaseName = dbname ? odr_strdup (m_odr, dbname) : 0; - rec->which = Z_NamePlusRecord_surrogateDiagnostic; - rec->u.surrogateDiagnostic = drec; - drec->which = Z_DiagRec_defaultFormat; - drec->u.defaultFormat = dr; - dr->diagnosticSetId = odr_oiddup (m_odr, - oid_ent_to_oid(&bib1, oid)); - dr->condition = err; - dr->which = Z_DefaultDiagFormat_v2Addinfo; - dr->u.v2Addinfo = odr_strdup (m_odr, addinfo ? addinfo : ""); -} - -ODR Yaz_Facility_ILL::odr_encode() -{ - return m_odr; -} - int Yaz_Facility_ILL::init(Yaz_Z_Server *s, Z_InitRequest *initRequest, Z_InitResponse *initResponse) { @@ -81,7 +35,6 @@ int Yaz_Facility_ILL::recv(Yaz_Z_Server *s, Z_APDU *apdu_request) { Z_APDU *apdu_response; - m_odr = s->odr_encode(); if (apdu_request->which != Z_APDU_extendedServicesRequest) return 0; Z_ExtendedServicesRequest *req = apdu_request->u.extendedServicesRequest;