Server sets OPTIONS search and present.
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 29 Jan 2001 11:18:24 +0000 (11:18 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 29 Jan 2001 11:18:24 +0000 (11:18 +0000)
src/yaz-pdu-assoc.cpp
src/yaz-z-server.cpp

index 0925962..1c009b4 100644 (file)
@@ -3,7 +3,10 @@
  * See the file LICENSE for details.
  * 
  * $Log: yaz-pdu-assoc.cpp,v $
  * See the file LICENSE for details.
  * 
  * $Log: yaz-pdu-assoc.cpp,v $
- * Revision 1.21  2000-11-20 14:17:36  adam
+ * Revision 1.22  2001-01-29 11:18:24  adam
+ * Server sets OPTIONS search and present.
+ *
+ * Revision 1.21  2000/11/20 14:17:36  adam
  * Yet another WIN32 fix for connect notify.
  *
  * Revision 1.20  2000/11/20 11:27:33  adam
  * Yet another WIN32 fix for connect notify.
  *
  * Revision 1.20  2000/11/20 11:27:33  adam
@@ -96,7 +99,7 @@ Yaz_PDU_Assoc::Yaz_PDU_Assoc(IYazSocketObservable *socketObservable)
     m_next = 0;
     m_destroyed = 0;
     m_idleTime = 0;
     m_next = 0;
     m_destroyed = 0;
     m_idleTime = 0;
-    m_log = LOG_DEBUG;
+    m_log = LOG_LOG;
 }
 
 IYaz_PDU_Observable *Yaz_PDU_Assoc::clone()
 }
 
 IYaz_PDU_Observable *Yaz_PDU_Assoc::clone()
index 38fedb4..096cfa0 100644 (file)
@@ -3,7 +3,10 @@
  * See the file LICENSE for details.
  * 
  * $Log: yaz-z-server.cpp,v $
  * See the file LICENSE for details.
  * 
  * $Log: yaz-z-server.cpp,v $
- * Revision 1.5  2000-10-24 12:29:57  adam
+ * Revision 1.6  2001-01-29 11:18:24  adam
+ * Server sets OPTIONS search and present.
+ *
+ * Revision 1.5  2000/10/24 12:29:57  adam
  * Fixed bug in proxy where a Yaz_ProxyClient could be owned by
  * two Yaz_Proxy's (fatal).
  *
  * Fixed bug in proxy where a Yaz_ProxyClient could be owned by
  * two Yaz_Proxy's (fatal).
  *
@@ -279,12 +282,20 @@ void Yaz_Z_Server::fetch_via_present (Z_PresentRequest *req,
     
 void Yaz_Z_Server::recv_Z_PDU (Z_APDU *apdu_request)
 {   
     
 void Yaz_Z_Server::recv_Z_PDU (Z_APDU *apdu_request)
 {   
+    Z_Options *req, *res;
     Z_APDU *apdu_response;
     switch (apdu_request->which)
     {
     case Z_APDU_initRequest:
         logf (LOG_LOG, "got InitRequest p=%p", this);
        apdu_response = create_Z_PDU(Z_APDU_initResponse);
     Z_APDU *apdu_response;
     switch (apdu_request->which)
     {
     case Z_APDU_initRequest:
         logf (LOG_LOG, "got InitRequest p=%p", this);
        apdu_response = create_Z_PDU(Z_APDU_initResponse);
+        req = apdu_request->u.initRequest->options;
+        res = apdu_response->u.initResponse->options;
+
+        if (ODR_MASK_GET(req, Z_Options_search))
+           ODR_MASK_SET(res, Z_Options_search);
+        if (ODR_MASK_GET(req, Z_Options_present))
+            ODR_MASK_SET(res, Z_Options_present);
        recv_Z_init (apdu_request->u.initRequest,
                     apdu_response->u.initResponse);
        m_preferredMessageSize =
        recv_Z_init (apdu_request->u.initRequest,
                     apdu_response->u.initResponse);
        m_preferredMessageSize =