Change title
[yazpp-moved-to-github.git] / src / yaz-z-server-ursula.cpp
index 07abb13..13be0f1 100644 (file)
@@ -2,15 +2,13 @@
  * Copyright (c) 2001, Index Data.
  * See the file LICENSE for details.
  * 
- * $Log: yaz-z-server-ursula.cpp,v $
- * Revision 1.1  2001-04-04 14:02:49  adam
- * URSULA / Z-ruth service.
- *
+ * $Id: yaz-z-server-ursula.cpp,v 1.7 2002-10-23 21:24:19 adam Exp $
  */
 
 #include <yaz/log.h>
-#include <yaz++/yaz-z-server.h>
+#include <yaz++/z-server.h>
 
+#if HAVE_YAZ_URSULA_H
 int Yaz_Facility_Ursula::init(Yaz_Z_Server *s, Z_InitRequest *initRequest,
                              Z_InitResponse *initResponse)
 {
@@ -37,7 +35,7 @@ int Yaz_Facility_Ursula::recv(Yaz_Z_Server *s, Z_APDU *apdu_request)
 
     if (r->which != ODR_EXTERNAL_octet)
     {
-       logf (LOG_LOG, "ursula::recv not octet alighed");
+       yaz_log (LOG_LOG, "ursula::recv not octet alighed");
         return 0;
     }
     odr_setbuf (s->odr_decode(), (char*) r->u.octet_aligned->buf,
@@ -45,12 +43,15 @@ int Yaz_Facility_Ursula::recv(Yaz_Z_Server *s, Z_APDU *apdu_request)
     Z_UrsPDU *pdu = 0;
     if (!z_UrsPDU (s->odr_decode(), &pdu, 0, ""))
     {
-       logf (LOG_LOG, "ursula::decode failed");
+       yaz_log (LOG_LOG, "ursula::decode failed");
        return 0;
     }
     yaz_log (LOG_LOG, "got ursula packet");
     apdu_response = s->create_Z_PDU(Z_APDU_extendedServicesResponse);
-    ursula_service(req, pdu, apdu_response->u.extendedServicesResponse);
+    ursula_service(req, pdu, apdu_response->u.extendedServicesResponse, NULL);
+      // FIXME: Initialize the response pdu...   ADAM!!!
+    s->transfer_referenceId(apdu_request, apdu_response);
     s->send_Z_PDU(apdu_response);
     return 1;
 }
+#endif