Added cs_get_SSL. yaz-client-ssl prints peer info
[yaz-moved-to-github.git] / src / seshigh.c
index 34fe0b0..1bdede6 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1995-2004, Index Data
  * See the file LICENSE for details.
  *
- * $Id: seshigh.c,v 1.19 2004-01-27 12:15:12 adam Exp $
+ * $Id: seshigh.c,v 1.23 2004-03-29 15:09:14 adam Exp $
  */
 
 /*
@@ -471,6 +471,7 @@ static int srw_bend_init(association *assoc)
     ce = yaz_set_proposal_charneg(assoc->decode, &encoding, 1, 0, 0, 1);
     assoc->init->charneg_request = ce->u.charNeg3;
 #endif
+    assoc->backend = 0;
     if (!(binitres = (*cb->bend_init)(assoc->init)))
     {
        yaz_log(LOG_WARN, "Bad response from backend.");
@@ -663,8 +664,8 @@ static void srw_bend_search(association *assoc, request *req,
        yaz_mk_std_diagnostic(assoc->encode, srw_res->diagnostics,
                              yaz_diag_bib1_to_srw (rr.errcode),
                              rr.errstring);
-        yaz_log(LOG_DEBUG, "srw_bend_search returned SRW error %d",
-                *srw_res->diagnostics[0].code);
+        yaz_log(LOG_DEBUG, "srw_bend_search returned SRW error %s",
+                srw_res->diagnostics[0].uri);
     }
     else
     {
@@ -752,6 +753,7 @@ static void srw_bend_explain(association *assoc, request *req,
         rr.print = assoc->print;
         rr.explain_buf = 0;
        rr.database = srw_req->database;
+       rr.schema = "http://explain.z3950.org/dtd/2.0/";
         (*assoc->init->bend_explain)(assoc->backend, &rr);
         if (rr.explain_buf)
         {
@@ -857,6 +859,7 @@ static void process_http_request(association *assoc, request *req)
        }
        else
        {
+                yaz_log(LOG_LOG, "generate soap error");
            http_code = 500;
            z_soap_error(assoc->encode, soap_package,
                         "SOAP-ENV:Client", "Bad method", 0); 
@@ -1195,6 +1198,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
             assoc->init->charneg_request = negotiation;
     }
     
+    assoc->backend = 0;
     if (!(binitres = (*cb->bend_init)(assoc->init)))
     {
        yaz_log(LOG_WARN, "Bad response from backend.");
@@ -1317,7 +1321,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
                assoc->init->implementation_name,
                odr_prepend(assoc->encode, "GFS", resp->implementationName));
 
-    version = odr_strdup(assoc->encode, "$Revision: 1.19 $");
+    version = odr_strdup(assoc->encode, "$Revision: 1.23 $");
     if (strlen(version) > 10)  /* check for unexpanded CVS strings */
        version[strlen(version)-2] = '\0';
     resp->implementationVersion = odr_prepend(assoc->encode,
@@ -1412,6 +1416,7 @@ static Z_External *init_diagnostics(ODR odr, int error, char *addinfo)
 
     e->which = Z_DiagnosticFormat_s_defaultDiagRec;
     e->u.defaultDiagRec = justdiag(odr, error, addinfo);
+    e->message = 0;
     return x;
 }