Fix bug with missing initialization of member in init_diagnostics.
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 29 Mar 2004 15:09:13 +0000 (15:09 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 29 Mar 2004 15:09:13 +0000 (15:09 +0000)
This bug affects threaded version of GFS server.

CHANGELOG
Makefile.am
src/seshigh.c
ztest/ztest.c

index 5b26678..a578895 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,8 @@
 Possible compatibility problems with earlier versions marked with '*'.
 
 Possible compatibility problems with earlier versions marked with '*'.
 
+Fix bug with missing initialization of member in init_diagnostics.
+This bug affects threaded version of GFS server.
+
 --- 2.0.18 2004/03/20
 
 Use wrbuf_xmlputs_n instead of wrbuf_write_cdata to avoid clash with
 --- 2.0.18 2004/03/20
 
 Use wrbuf_xmlputs_n instead of wrbuf_write_cdata to avoid clash with
index 8b7416f..630ecb6 100644 (file)
@@ -1,6 +1,6 @@
-## Copyright (C) 1994-2003, Index Data
+## Copyright (C) 1994-2004, Index Data
 ## All rights reserved.
 ## All rights reserved.
-## $Id: Makefile.am,v 1.25 2004-03-10 16:34:29 adam Exp $
+## $Id: Makefile.am,v 1.26 2004-03-29 15:09:14 adam Exp $
 
 AUTOMAKE_OPTIONS = foreign 
 
 
 AUTOMAKE_OPTIONS = foreign 
 
index 936f31d..1bdede6 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1995-2004, Index Data
  * See the file LICENSE for details.
  *
  * Copyright (c) 1995-2004, Index Data
  * See the file LICENSE for details.
  *
- * $Id: seshigh.c,v 1.22 2004-03-16 13:12:43 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
     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.");
     if (!(binitres = (*cb->bend_init)(assoc->init)))
     {
        yaz_log(LOG_WARN, "Bad response from backend.");
@@ -1197,6 +1198,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
             assoc->init->charneg_request = negotiation;
     }
     
             assoc->init->charneg_request = negotiation;
     }
     
+    assoc->backend = 0;
     if (!(binitres = (*cb->bend_init)(assoc->init)))
     {
        yaz_log(LOG_WARN, "Bad response from backend.");
     if (!(binitres = (*cb->bend_init)(assoc->init)))
     {
        yaz_log(LOG_WARN, "Bad response from backend.");
@@ -1319,7 +1321,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
                assoc->init->implementation_name,
                odr_prepend(assoc->encode, "GFS", resp->implementationName));
 
                assoc->init->implementation_name,
                odr_prepend(assoc->encode, "GFS", resp->implementationName));
 
-    version = odr_strdup(assoc->encode, "$Revision: 1.22 $");
+    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,
     if (strlen(version) > 10)  /* check for unexpanded CVS strings */
        version[strlen(version)-2] = '\0';
     resp->implementationVersion = odr_prepend(assoc->encode,
@@ -1414,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->which = Z_DiagnosticFormat_s_defaultDiagRec;
     e->u.defaultDiagRec = justdiag(odr, error, addinfo);
+    e->message = 0;
     return x;
 }
 
     return x;
 }
 
index bd4459e..7ea27de 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1995-2004, Index Data.
  * See the file LICENSE for details.
  *
  * Copyright (c) 1995-2004, Index Data.
  * See the file LICENSE for details.
  *
- * $Id: ztest.c,v 1.62 2004-01-27 21:22:44 adam Exp $
+ * $Id: ztest.c,v 1.63 2004-03-29 15:09:14 adam Exp $
  */
 
 /*
  */
 
 /*
@@ -641,6 +641,7 @@ bend_initresult *bend_init(bend_initrequest *q)
     q->bend_fetch = ztest_fetch;
     q->bend_scan = ztest_scan;
     q->bend_explain = ztest_explain;
     q->bend_fetch = ztest_fetch;
     q->bend_scan = ztest_scan;
     q->bend_explain = ztest_explain;
+
     return r;
 }
 
     return r;
 }