From bf6876570c2eeade25f5ed23052d0e94244d568c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 29 Mar 2004 15:09:13 +0000 Subject: [PATCH] Fix bug with missing initialization of member in init_diagnostics. This bug affects threaded version of GFS server. --- CHANGELOG | 3 +++ Makefile.am | 4 ++-- src/seshigh.c | 7 +++++-- ztest/ztest.c | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5b26678..a578895 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ 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 diff --git a/Makefile.am b/Makefile.am index 8b7416f..630ecb6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ -## Copyright (C) 1994-2003, Index Data +## Copyright (C) 1994-2004, Index Data ## 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 diff --git a/src/seshigh.c b/src/seshigh.c index 936f31d..1bdede6 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2,7 +2,7 @@ * 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 + assoc->backend = 0; 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->backend = 0; 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)); - 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, @@ -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->message = 0; return x; } diff --git a/ztest/ztest.c b/ztest/ztest.c index bd4459e..7ea27de 100644 --- a/ztest/ztest.c +++ b/ztest/ztest.c @@ -2,7 +2,7 @@ * 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; + return r; } -- 1.7.10.4