From: Adam Dickmeiss Date: Thu, 23 Oct 2003 13:49:58 +0000 (+0000) Subject: Fix a bug WRT APDU logging X-Git-Tag: YAZPP.0.7.2~10 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=9cecf3bd42e22746586731a315eaeea7a847b27e;p=yazpp-moved-to-github.git Fix a bug WRT APDU logging --- diff --git a/src/yaz-proxy-main.cpp b/src/yaz-proxy-main.cpp index a4897b0..7b5d3f3 100644 --- a/src/yaz-proxy-main.cpp +++ b/src/yaz-proxy-main.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2003, Index Data. * See the file LICENSE for details. * - * $Id: yaz-proxy-main.cpp,v 1.24 2003-10-23 13:00:35 adam Exp $ + * $Id: yaz-proxy-main.cpp,v 1.25 2003-10-23 13:49:58 adam Exp $ */ #include @@ -104,6 +104,7 @@ int args(Yaz_Proxy *proxy, int argc, char **argv) } if (addr) { + yaz_log(LOG_LOG, "Starting proxy pid=%ld", (long) getpid()); if (proxy->server(addr)) { yaz_log(LOG_FATAL|LOG_ERRNO, "listen %s", addr); diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 717fbf4..8c08847 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2003, Index Data. * See the file LICENSE for details. * - * $Id: yaz-proxy.cpp,v 1.67 2003-10-23 11:45:08 adam Exp $ + * $Id: yaz-proxy.cpp,v 1.68 2003-10-23 13:49:58 adam Exp $ */ #include @@ -1340,7 +1340,7 @@ void Yaz_Proxy::pre_init() other++; } } - yaz_log(LOG_LOG, "%s pre-init %s %s use=%d other=%d spare=%d preinit=%d", + yaz_log(LOG_LOG, "%s pre-init%s %s use=%d other=%d spare=%d preinit=%d", m_session_str, name, zurl_in_use[j], in_use, other, spare, pre_init); if (spare < pre_init) @@ -1534,7 +1534,7 @@ int Yaz_Proxy::server(const char *addr) int r = Yaz_Z_Assoc::server(addr); if (!r) { - yaz_log(LOG_LOG, "%sStarted proxy on %s", m_session_str, addr); + yaz_log(LOG_LOG, "%sStarted listener on %s", m_session_str, addr); timeout(1); } return r; diff --git a/src/yaz-z-assoc.cpp b/src/yaz-z-assoc.cpp index aa7d068..b832572 100644 --- a/src/yaz-z-assoc.cpp +++ b/src/yaz-z-assoc.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2003, Index Data. * See the file LICENSE for details. * - * $Id: yaz-z-assoc.cpp,v 1.30 2003-10-23 11:45:08 adam Exp $ + * $Id: yaz-z-assoc.cpp,v 1.31 2003-10-23 13:49:58 adam Exp $ */ #include @@ -218,6 +218,7 @@ Z_APDU *Yaz_Z_Assoc::decode_Z_PDU(const char *buf, int len) odr_setprint(m_odr_print, yaz_log_file()); z_APDU(m_odr_print, &apdu, 0, "decode"); m_APDU_file = save; + odr_setprint(m_odr_print, save); } if (m_APDU_file) { @@ -236,6 +237,7 @@ int Yaz_Z_Assoc::encode_Z_PDU(Z_APDU *apdu, char **buf, int *len) odr_setprint(m_odr_print, yaz_log_file()); // use YAZ log FILE z_APDU(m_odr_print, &apdu, 0, "encode"); m_APDU_file = save; + odr_setprint(m_odr_print, save); } if (m_APDU_file) {