From 2c74192108679a47afccf2732041c196745c0d5b Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 24 Oct 2003 10:33:01 +0000 Subject: [PATCH 01/16] Beginning work on keepalive script --- etc/Makefile.am | 2 +- etc/yaz-proxy-ka.sh | 12 ++++++++++++ etc/yaz-proxy.sh | 11 ++--------- 3 files changed, 15 insertions(+), 10 deletions(-) create mode 100755 etc/yaz-proxy-ka.sh diff --git a/etc/Makefile.am b/etc/Makefile.am index 20c9eb3..95f3bd7 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = config.xml voyager.xml yaz-proxy.sh +EXTRA_DIST = config.xml voyager.xml yaz-proxy.sh yaz-proxy-ka.sh noinst_SCRIPTS = yaz-proxy.sh diff --git a/etc/yaz-proxy-ka.sh b/etc/yaz-proxy-ka.sh new file mode 100755 index 0000000..551eca7 --- /dev/null +++ b/etc/yaz-proxy-ka.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# $Id: yaz-proxy-ka.sh,v 1.1 2003-10-24 10:33:01 adam Exp $ +i=1 +while test $i -lt 20; do + $* + test $? && exit 0 + if test -f core; then + mv -f core core.`date +%Y%m%d%k%M` + fi + sleep 1 + i=`expr $i + 1` +done diff --git a/etc/yaz-proxy.sh b/etc/yaz-proxy.sh index 757e240..b794d06 100755 --- a/etc/yaz-proxy.sh +++ b/etc/yaz-proxy.sh @@ -1,13 +1,6 @@ #!/bin/sh -# -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg . -# Modified for Debian GNU/Linux -# by Ian Murdock . -# -# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl +# $Id: yaz-proxy.sh,v 1.2 2003-10-24 10:33:01 adam Exp $ +# YAZ proxy start/stop init.d script. # PATH=/usr/local/bin:/bin:/usr/bin export PATH -- 1.7.10.4 From 5d130acdf40229a09196be672196554b0bbb3ba5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 24 Oct 2003 11:18:51 +0000 Subject: [PATCH 02/16] Describe option -u and -p --- doc/installation.xml | 11 ++++++++++- doc/yaz-proxy-ref.xml | 21 +++++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/doc/installation.xml b/doc/installation.xml index 7ee6300..259a59d 100644 --- a/doc/installation.xml +++ b/doc/installation.xml @@ -1,5 +1,5 @@ - + Installation You need a C++ compiler to compile and use YAZ++. @@ -58,6 +58,15 @@ ./configure --help. + Configure uses GCC's C/C++ compiler if available. To specify another + compiler, set CXX. To use other compiler flags, + specify CXXFLAGS. To use CC + with debugging you could use: + + CXXFLAGS="-g" CXX=CC ./configure + + + This is what you have after successful compilation: diff --git a/doc/yaz-proxy-ref.xml b/doc/yaz-proxy-ref.xml index 776f28a..044ff33 100644 --- a/doc/yaz-proxy-ref.xml +++ b/doc/yaz-proxy-ref.xml @@ -13,10 +13,12 @@ -m num -v level -t target - -u auth + -U auth -o level -i seconds -T seconds + -p pidfile + -u userid -c config host:port @@ -73,7 +75,7 @@ initRequest. - -u auth + -U auth Specifies authentication info to be sent to the backend target. This is useful if you happen to have an internal target that @@ -104,6 +106,21 @@ it willl be closed. Default: 600 seconds (10 minutes). + -p pidfile + + When specified, yaz-proxy will create pidfile + with the process ID of the proxy. The pidfile will be generated + before the process changes identity (see option -u). + + + -u userid + + When specified, yaz-proxy will change identity to the user ID + specified, just after the proxy has started listening to a + possibly priviledged port and after the PID file has been created + if specified by option -u. + + -c config Specifies config filename. Configuration is in XML -- 1.7.10.4 From 28897f8b6f8f69386086fb0b9f4f564d97d579a7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 24 Oct 2003 11:19:54 +0000 Subject: [PATCH 03/16] Proper check for exit code in keepalive script --- etc/yaz-proxy-ka.sh | 36 ++++++++++++++++++++++++++++++++---- etc/yaz-proxy.sh | 10 +++++++--- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/etc/yaz-proxy-ka.sh b/etc/yaz-proxy-ka.sh index 551eca7..f7bd86f 100755 --- a/etc/yaz-proxy-ka.sh +++ b/etc/yaz-proxy-ka.sh @@ -1,10 +1,38 @@ #!/bin/sh -# $Id: yaz-proxy-ka.sh,v 1.1 2003-10-24 10:33:01 adam Exp $ +# $Id: yaz-proxy-ka.sh,v 1.2 2003-10-24 11:19:54 adam Exp $ +# +# Allow core dumps when testing. +ulimit -c 200000 +# +LOGFILE=/var/log/yaz-proxy-ka.log +# +touch $LOGFILE || exit 1 i=1 -while test $i -lt 20; do - $* - test $? && exit 0 +while test $i -lt 100; do + date >>$LOGFILE + echo "Starting proxy iteration=$i" >>$LOGFILE + yaz-proxy $* + code=$? + date >>$LOGFILE + echo "Proxy Stopped. Exit code=$code" >>$LOGFILE + if test "$code" = "143"; then + echo "Got TERM. Exiting" >>$LOGFILE + exit 0 + fi + if test "$code" = "129"; then + echo "Got HUP. Exiting" >>$LOGFILE + exit 0 + fi + if test "$code" = "137"; then + echo "Got KILL. Exiting" >>$LOGFILE + exit 0 + fi + if test "$code" = "0"; then + echo "Exit 0. Exiting" >>$LOGFILE + exit 0 + fi if test -f core; then + echo "Saving core file" >>$LOGFILE mv -f core core.`date +%Y%m%d%k%M` fi sleep 1 diff --git a/etc/yaz-proxy.sh b/etc/yaz-proxy.sh index b794d06..fa6e0f0 100755 --- a/etc/yaz-proxy.sh +++ b/etc/yaz-proxy.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: yaz-proxy.sh,v 1.2 2003-10-24 10:33:01 adam Exp $ +# $Id: yaz-proxy.sh,v 1.3 2003-10-24 11:19:54 adam Exp $ # YAZ proxy start/stop init.d script. # PATH=/usr/local/bin:/bin:/usr/bin @@ -7,8 +7,9 @@ export PATH # Proxy CWD is here. Should be writable by it. DIR=/var/yaz-proxy -# Proxy Path -DAEMON="/usr/local/bin/yaz-proxy" +# Proxy Path (either the actual one, or the keepalive one (for testing) +DAEMON=/usr/local/bin/yaz-proxy +DAEMON=/var/yaz-proxy/yaz-proxy-ka.sh # Proxy PIDFILE. Must be writable by it. PIDFILE="/var/run/yaz-proxy.pid" @@ -29,6 +30,9 @@ if test -n "RUNAS"; then ARGS="-u $RUNAS $ARGS" fi +# Increase number of sockets, if needed +#ulimit -n 1050 + # Name, Description (not essential) NAME=yaz-proxy DESC="YAZ proxy" -- 1.7.10.4 From b3557319e30d8f05fb0383fe5ca76857b8f17f64 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 24 Oct 2003 12:19:23 +0000 Subject: [PATCH 04/16] Slightly changes options usage --- src/yaz-proxy-main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/yaz-proxy-main.cpp b/src/yaz-proxy-main.cpp index 7b5d3f3..62bc87e 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.25 2003-10-23 13:49:58 adam Exp $ + * $Id: yaz-proxy-main.cpp,v 1.26 2003-10-24 12:19:23 adam Exp $ */ #include @@ -19,8 +19,8 @@ void usage(char *prog) { - fprintf (stderr, "%s: [-c config] [-a log] [-m num] [-v level] [-t target] [-i sec] " - "[-u uid] [-p pidfile] [-o optlevel] @:port\n", prog); + fprintf (stderr, "%s: [-c config] [-l log] [-a log] [-v level] [-t target] " + "[-u uid] [-p pidfile] @:port\n", prog); exit (1); } -- 1.7.10.4 From 624453e6dc1e47c287d44a7692cfc0e645698e74 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 24 Oct 2003 12:20:06 +0000 Subject: [PATCH 05/16] Describe -l --- configure.in | 2 +- doc/proxy.xml | 6 +++++- doc/yaz-proxy-ref.xml | 11 ++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index bd9d37e..05517ad 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE("yaz++",0.7.1) +AM_INIT_AUTOMAKE("yaz++",0.7.2) AC_PROG_CC AC_PROG_CPP diff --git a/doc/proxy.xml b/doc/proxy.xml index dfac254..ebb1e9c 100644 --- a/doc/proxy.xml +++ b/doc/proxy.xml @@ -581,7 +581,11 @@ client-apdu Log APDUs as reported by YAZ for the - communication between the client and the proxy + communication between the client and the proxy. + This facility is equivalent to the APDU logging that + happens when using option -a, however + this tells the proxy to log in the same file as given + by -l. diff --git a/doc/yaz-proxy-ref.xml b/doc/yaz-proxy-ref.xml index 044ff33..1e1dc89 100644 --- a/doc/yaz-proxy-ref.xml +++ b/doc/yaz-proxy-ref.xml @@ -10,6 +10,7 @@ yaz-proxy -a filename + -l filename -m num -v level -t target @@ -55,6 +56,14 @@ standard output. + -l filename + + Specifies the name of a file to which to write a log of the + YAZ proxy activity. This uses the logging facility as provided + by the YAZ toolkit. If this options is omitted, the output + directed to stderr. + + -m num Specifies the maximum number of connections to be cached @@ -63,7 +72,7 @@ -v level - Sets the logging level. level is + Sets the logging level. level is a comma-separated list of members of the set {fatal,debug,warn,log,malloc,all,none}. -- 1.7.10.4 From 32cb4b82f46179c4af7986e004f0f05cb0c13dc9 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 24 Oct 2003 12:35:37 +0000 Subject: [PATCH 06/16] Added comment --- etc/yaz-proxy-ka.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/yaz-proxy-ka.sh b/etc/yaz-proxy-ka.sh index f7bd86f..20d1a46 100755 --- a/etc/yaz-proxy-ka.sh +++ b/etc/yaz-proxy-ka.sh @@ -1,5 +1,7 @@ #!/bin/sh -# $Id: yaz-proxy-ka.sh,v 1.2 2003-10-24 11:19:54 adam Exp $ +# $Id: yaz-proxy-ka.sh,v 1.3 2003-10-24 12:35:37 adam Exp $ +# +# YAZ proxy keepalive wrapper, use this when testing the proxy. # # Allow core dumps when testing. ulimit -c 200000 -- 1.7.10.4 From 89a060d93d5f6f7bddc56463f147af7c750d7634 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sat, 8 Nov 2003 18:51:10 +0000 Subject: [PATCH 07/16] If pdu max >= 60, penalty wait is 1 second rather than 0 (no wait) --- src/yaz-proxy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 5864a12..0dc0669 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.69 2003-10-23 13:59:37 adam Exp $ + * $Id: yaz-proxy.cpp,v 1.70 2003-11-08 18:51:10 adam Exp $ */ #include @@ -895,7 +895,6 @@ void Yaz_Proxy::recv_Z_PDU(Z_APDU *apdu, int len) if (cp) sprintf(cp+1, "%d ", m_request_no); - int reduce = 0; m_bytes_recv += len; if (m_log_mask & PROXY_LOG_APDU_CLIENT) @@ -913,6 +912,7 @@ void Yaz_Proxy::recv_Z_PDU(Z_APDU *apdu, int len) yaz_log(LOG_LOG, "%sstat bw=%d pdu=%d limit-bw=%d limit-pdu=%d", m_session_str, bw_total, pdu_total, m_bw_max, m_pdu_max); + int reduce = 0; if (m_bw_max) { if (bw_total > m_bw_max) @@ -924,7 +924,7 @@ void Yaz_Proxy::recv_Z_PDU(Z_APDU *apdu, int len) { if (pdu_total > m_pdu_max) { - int nreduce = (60/m_pdu_max); + int nreduce = (m_pdu_max >= 60) ? 1 : 60/m_pdu_max; reduce = (reduce > nreduce) ? reduce : nreduce; } } -- 1.7.10.4 From b0e80dcddb94c00391505d78f2f79b42469af14e Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 11 Nov 2003 22:54:41 +0000 Subject: [PATCH 08/16] Ignore generated files --- etc/.cvsignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 etc/.cvsignore diff --git a/etc/.cvsignore b/etc/.cvsignore new file mode 100644 index 0000000..282522d --- /dev/null +++ b/etc/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in -- 1.7.10.4 From 9e1bd9899f0a7d7e7c0a9097ffb1ff64db2627c9 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sun, 23 Nov 2003 18:39:35 +0000 Subject: [PATCH 09/16] Spell fixes --- doc/proxy.xml | 16 ++++++++-------- doc/yaz-proxy-ref.xml | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/proxy.xml b/doc/proxy.xml index ebb1e9c..0fdbd13 100644 --- a/doc/proxy.xml +++ b/doc/proxy.xml @@ -173,7 +173,7 @@ When a client reconnects, query and record caching works better, if the proxy assigns it to the same backend as before. And the result set - (if any) is re-used. To achive this, Index Data defined a session + (if any) is re-used. To achieve this, Index Data defined a session cookie which identifies the backend session. @@ -299,7 +299,7 @@ Configuration: target The element target which may be repeated zero - or more times with parent elemtn proxy contains + or more times with parent element proxy contains information about each backend target. The target element have two attributes: name which holds the logical name of the backend @@ -375,7 +375,7 @@ measures the number of bytes transferred within the last minute. The pdu is the number of requests in the last minute. The retrieve holds the maximum records to - be retrived in one Present Request. + be retrieved in one Present Request. If a bandwidth/pdu limit is reached the proxy will postpone the @@ -455,7 +455,7 @@ or a particular record syntax request from the client. - The syntax has one equired attribute: + The syntax has one required attribute: type which is the Preferred Record Syntax. @@ -473,8 +473,8 @@ type should be XML. The proxy will use preferred record syntax USMARC/MARC21 against the backend target. - To accept USMARC and offer MARCXML XML recors but reject - all other requests the following configuaration could be used: + To accept USMARC and offer MARCXML XML records but reject + all other requests the following configuration could be used: <proxy> <target name="mytarget"> @@ -495,7 +495,7 @@ a target session is shut down. - This can also be specified on the command line bt using option + This can also be specified on the command line by using option -T. Refer to . @@ -679,4 +679,4 @@ sgml-namecase-general:t End: --> - \ No newline at end of file + diff --git a/doc/yaz-proxy-ref.xml b/doc/yaz-proxy-ref.xml index 1e1dc89..252ed1d 100644 --- a/doc/yaz-proxy-ref.xml +++ b/doc/yaz-proxy-ref.xml @@ -43,7 +43,7 @@ yaz-proxy rereads its configuration file and - reopens log files when it receivies the hangup signal, SIGHUP. + reopens log files when it receives the hangup signal, SIGHUP. OPTIONS @@ -112,7 +112,7 @@ Specifies in seconds the idle time for communication between proxy and backend target. If a connection is inactive for this long - it willl be closed. Default: 600 seconds (10 minutes). + it will be closed. Default: 600 seconds (10 minutes). -p pidfile @@ -126,7 +126,7 @@ When specified, yaz-proxy will change identity to the user ID specified, just after the proxy has started listening to a - possibly priviledged port and after the PID file has been created + possibly privileged port and after the PID file has been created if specified by option -u. -- 1.7.10.4 From be307dc5e38d90ffa1596f495d9ec2f2115c6dc4 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 25 Nov 2003 21:54:02 +0000 Subject: [PATCH 10/16] comment one option out --- etc/yaz-proxy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/yaz-proxy.sh b/etc/yaz-proxy.sh index fa6e0f0..1434864 100755 --- a/etc/yaz-proxy.sh +++ b/etc/yaz-proxy.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: yaz-proxy.sh,v 1.3 2003-10-24 11:19:54 adam Exp $ +# $Id: yaz-proxy.sh,v 1.4 2003-11-25 21:54:02 adam Exp $ # YAZ proxy start/stop init.d script. # PATH=/usr/local/bin:/bin:/usr/bin @@ -9,7 +9,7 @@ export PATH DIR=/var/yaz-proxy # Proxy Path (either the actual one, or the keepalive one (for testing) DAEMON=/usr/local/bin/yaz-proxy -DAEMON=/var/yaz-proxy/yaz-proxy-ka.sh +#DAEMON=/var/yaz-proxy/yaz-proxy-ka.sh # Proxy PIDFILE. Must be writable by it. PIDFILE="/var/run/yaz-proxy.pid" -- 1.7.10.4 From 7e3e46d9a207d1c6d56704b64c2ebee58b170795 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 25 Nov 2003 21:54:18 +0000 Subject: [PATCH 11/16] Fix attribute check --- src/yaz-proxy-config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yaz-proxy-config.cpp b/src/yaz-proxy-config.cpp index 1742cf8..c4ed43d 100644 --- a/src/yaz-proxy-config.cpp +++ b/src/yaz-proxy-config.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2003, Index Data. * See the file LICENSE for details. * - * $Id: yaz-proxy-config.cpp,v 1.13 2003-10-24 10:21:24 adam Exp $ + * $Id: yaz-proxy-config.cpp,v 1.14 2003-11-25 21:54:18 adam Exp $ */ #include @@ -276,7 +276,7 @@ int Yaz_ProxyConfig::check_type_1_attributes(ODR odr, xmlNodePtr ptrl, *addinfo = odr_strdup(odr, addinfo_str); return atoi(match_error); } - return 0; + break; } } } -- 1.7.10.4 From 0740a9166f0b29ece0e9f4bdc003e2de267751cb Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 25 Nov 2003 22:00:41 +0000 Subject: [PATCH 12/16] 0.7.3 --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 05517ad..e16e7bd 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE("yaz++",0.7.2) +AM_INIT_AUTOMAKE("yaz++",0.7.3) AC_PROG_CC AC_PROG_CPP -- 1.7.10.4 From a13324ae6587c8ca73748264b7cc2dea51c2d862 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 27 Nov 2003 10:35:00 +0000 Subject: [PATCH 13/16] Ignore autom4te.cache --- .cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.cvsignore b/.cvsignore index 6cf21e1..9dbc2a8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -7,3 +7,4 @@ config.status configure libtool yaz++-config +autom4te.cache -- 1.7.10.4 From e66e1480f40a782000c79c76815ac25a691b661d Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 8 Dec 2003 14:37:23 +0000 Subject: [PATCH 14/16] Essentially identical to the canonical ZOOM client listed on the ZOOM web-site's C++ Binding page. Apart from formatting tweaks, the only different is the use of the stupid "std::" prefix in front of all the strings, couts, etc. --- zoom/canonical.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 zoom/canonical.cpp diff --git a/zoom/canonical.cpp b/zoom/canonical.cpp new file mode 100644 index 0000000..940ae6a --- /dev/null +++ b/zoom/canonical.cpp @@ -0,0 +1,16 @@ +/* g++ -g -o canonical canonical.cpp -lyaz++ -lyaz -lxml2 */ + +#include +#include + +using namespace ZOOM; + +int main(int argc, char **argv) +{ + connection conn("z3950.loc.gov", 7090); + conn.option("databaseName", "Voyager"); + conn.option("preferredRecordSyntax", "USMARC"); + resultSet rs(conn, prefixQuery("@attr 1=7 0253333490")); + const record rec(rs, 0); + std::cout << rec.render() << std::endl; +} -- 1.7.10.4 From 39d361df694b13d711bbb1ad2f61b18a8b68caf9 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 16 Dec 2003 11:26:14 +0000 Subject: [PATCH 15/16] Timeout event was not fired when select returned I/O (res > 0). --- src/yaz-socket-manager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/yaz-socket-manager.cpp b/src/yaz-socket-manager.cpp index 163cb33..ad92a08 100644 --- a/src/yaz-socket-manager.cpp +++ b/src/yaz-socket-manager.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Id: yaz-socket-manager.cpp,v 1.20 2003-07-25 19:27:36 adam Exp $ + * $Id: yaz-socket-manager.cpp,v 1.21 2003-12-16 11:26:14 adam Exp $ */ #include #ifdef WIN32 @@ -199,12 +199,14 @@ int Yaz_SocketManager::processEvent() event->observer = p->observer; event->event = mask; putEvent (event); + + yaz_log (m_log, "putEvent I/O mask=%d", mask); } - else if (res == 0 && p->timeout && p->timeout_this == timeout) + else if (p->timeout && (now - p->last_activity) >= p->timeout) { YazSocketEvent *event = new YazSocketEvent; assert (p->last_activity); - yaz_log (m_log, "timeout, now = %ld last_activity=%ld timeout=%d", + yaz_log (m_log, "putEvent timeout, now = %ld last_activity=%ld timeout=%d", now, p->last_activity, p->timeout); p->last_activity = now; event->observer = p->observer; -- 1.7.10.4 From f7bb8a2528c7c1552ba255388eb246267c252250 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 16 Dec 2003 11:26:42 +0000 Subject: [PATCH 16/16] 2003. --- src/yaz-socket-manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yaz-socket-manager.cpp b/src/yaz-socket-manager.cpp index ad92a08..82bc0a3 100644 --- a/src/yaz-socket-manager.cpp +++ b/src/yaz-socket-manager.cpp @@ -1,8 +1,8 @@ /* - * Copyright (c) 1998-2001, Index Data. + * Copyright (c) 1998-2003, Index Data. * See the file LICENSE for details. * - * $Id: yaz-socket-manager.cpp,v 1.21 2003-12-16 11:26:14 adam Exp $ + * $Id: yaz-socket-manager.cpp,v 1.22 2003-12-16 11:26:42 adam Exp $ */ #include #ifdef WIN32 -- 1.7.10.4