From 966d1a0443071c2b75426d0214bfb9960c5c3fba Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sun, 4 Nov 2001 22:36:21 +0000 Subject: [PATCH] Fixed problem processEvent which in rare cases return 0. --- configure.in | 2 +- include/yaz++/yaz-socket-manager.h | 3 +- src/Makefile.am | 4 +- src/yaz-ir-assoc.cpp | 45 +----------------- src/yaz-marc-sample.cpp | 5 +- src/yaz-my-client.cpp | 88 +--------------------------------- src/yaz-my-server.cpp | 74 +---------------------------- src/yaz-pdu-assoc-thread.cpp | 11 +---- src/yaz-pdu-assoc.cpp | 81 +------------------------------ src/yaz-proxy-main.cpp | 45 +----------------- src/yaz-proxy.cpp | 92 +----------------------------------- src/yaz-socket-manager.cpp | 72 +++++----------------------- src/yaz-z-assoc.cpp | 75 +---------------------------- src/yaz-z-query.cpp | 38 +-------------- src/yaz-z-server-ill.cpp | 20 +------- src/yaz-z-server-sr.cpp | 10 +--- src/yaz-z-server-update.cpp | 10 +--- src/yaz-z-server-ursula.cpp | 17 +------ src/yaz-z-server.cpp | 42 +--------------- yaz.m4 | 2 +- 20 files changed, 36 insertions(+), 700 deletions(-) diff --git a/configure.in b/configure.in index cbb90bf..5e07d83 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(configure.in) -AM_INIT_AUTOMAKE("yaz++", 0.1) +AM_INIT_AUTOMAKE("yaz++", 0.2) AC_PROG_CC AC_PROG_CPP diff --git a/include/yaz++/yaz-socket-manager.h b/include/yaz++/yaz-socket-manager.h index 0cb57c8..73b00d2 100644 --- a/include/yaz++/yaz-socket-manager.h +++ b/include/yaz++/yaz-socket-manager.h @@ -2,7 +2,7 @@ * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. * - * $Id: yaz-socket-manager.h,v 1.1 2000-10-11 11:58:16 adam Exp $ + * $Id: yaz-socket-manager.h,v 1.2 2001-11-04 22:36:21 adam Exp $ */ #ifndef YAZ_SOCKET_MANAGER_INCLUDED @@ -22,6 +22,7 @@ class YAZ_EXPORT Yaz_SocketManager : public IYazSocketObservable { int fd; unsigned mask; unsigned timeout; + unsigned timeout_this; time_t last_activity; YazSocketEntry *next; }; diff --git a/src/Makefile.am b/src/Makefile.am index 22f29ce..07bc103 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ -## $Id: Makefile.am,v 1.7 2001-08-09 09:01:03 adam Exp $ +## $Id: Makefile.am,v 1.8 2001-11-04 22:36:21 adam Exp $ -INCLUDES=$(YAZINC) -I$(srcdir)/../include +CXXFLAGS = $(YAZINC) -I$(srcdir)/../include lib_LTLIBRARIES = libyaz++.la diff --git a/src/yaz-ir-assoc.cpp b/src/yaz-ir-assoc.cpp index d30eab3..68f7012 100644 --- a/src/yaz-ir-assoc.cpp +++ b/src/yaz-ir-assoc.cpp @@ -2,50 +2,7 @@ * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. * - * $Log: yaz-ir-assoc.cpp,v $ - * Revision 1.16 2001-08-13 16:39:12 adam - * PDU_Assoc keeps track of children. Using yaz_log instead of logf. - * - * Revision 1.15 2001/04/26 12:17:49 heikki - * Ursula stuff, mostly in the test client - * - * Revision 1.14 2000/10/11 11:58:16 adam - * Moved header files to include/yaz++. Switched to libtool and automake. - * Configure script creates yaz++-config script. - * - * Revision 1.13 2000/09/06 14:23:45 adam - * WIN32 updates. - * - * Revision 1.12 2000/05/10 11:36:58 ian - * Added default parameters for refid to request functions. - * Added default parameter for result set name to search and present request. - * Commented out forced logging of PDU contents. - * Added send_deleteResultSetRequest - * - * Revision 1.11 1999/12/06 13:52:45 adam - * Modified for new location of YAZ header files. Experimental threaded - * operation. - * - * Revision 1.10 1999/04/29 07:33:28 adam - * Changed setting of host in connect/proxy setting. YAZ' strtoaddr now - * ignores database part of host. - * - * Revision 1.9 1999/04/28 13:29:14 adam - * Yet another fix regarding database settings. - * - * Revision 1.8 1999/04/28 13:04:03 adam - * Fixed setting of proxy otherInfo so that database(s) are removed. - * - * Revision 1.7 1999/04/21 12:09:01 adam - * Many improvements. Modified to proxy server to work with "sessions" - * based on cookies. - * - * Revision 1.6 1999/04/20 10:30:05 adam - * Implemented various stuff for client and proxy. Updated calls - * to ODR to reflect new name parameter. - * - * Revision 1.5 1999/04/09 11:46:57 adam - * Added object Yaz_Z_Assoc. Much more functional client. + * $Id: yaz-ir-assoc.cpp,v 1.17 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-marc-sample.cpp b/src/yaz-marc-sample.cpp index a276242..5ad5bd6 100644 --- a/src/yaz-marc-sample.cpp +++ b/src/yaz-marc-sample.cpp @@ -2,10 +2,7 @@ * Copyright (c) 2000-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-marc-sample.cpp,v $ - * Revision 1.1 2001-03-27 14:47:45 adam - * New server facility scheme. - * + * $Id: yaz-marc-sample.cpp,v 1.2 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-my-client.cpp b/src/yaz-my-client.cpp index c655184..6bb36eb 100644 --- a/src/yaz-my-client.cpp +++ b/src/yaz-my-client.cpp @@ -1,92 +1,8 @@ /* - * Copyright (c) 1998-2000, Index Data. + * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-my-client.cpp,v $ - * Revision 1.9 2001-04-26 17:51:56 heikki - * better ursula request (doesn't crash) - * - * Revision 1.8 2001/04/26 17:30:07 heikki - * Ursularequest got more default data - * - * Revision 1.7 2001/04/26 12:17:49 heikki - * Ursula stuff, mostly in the test client - * - * Revision 1.6 2001/04/17 16:21:21 heikki - * Working on UrsulaRenewal, Request, and Update - * - * Revision 1.5 2001/04/10 10:48:08 adam - * Fixed problem where proxy could cash bad result sets. - * - * Revision 1.4 2001/04/05 15:12:24 adam - * WIN32 updates. - * - * Revision 1.3 2001/04/05 13:09:44 adam - * Removed ursula dependancy. - * - * Revision 1.2 2001/04/04 14:02:49 adam - * URSULA / Z-ruth service. - * - * Revision 1.1 2001/03/27 14:47:45 adam - * New server facility scheme. - * - * Revision 1.17 2001/03/26 14:43:49 adam - * New threaded PDU association. - * - * Revision 1.16 2000/11/01 14:22:59 adam - * Added fd parameter for method IYaz_PDU_Observer::clone. - * - * Revision 1.15 2000/10/11 11:58:16 adam - * Moved header files to include/yaz++. Switched to libtool and automake. - * Configure script creates yaz++-config script. - * - * Revision 1.14 2000/09/08 10:23:42 adam - * Added skeleton of yaz-z-server. - * - * Revision 1.13 2000/09/06 14:23:45 adam - * WIN32 updates. - * - * Revision 1.12 2000/09/04 08:59:16 adam - * Changed call to logging functions (yaz_ added). - * - * Revision 1.11 2000/07/04 13:48:49 adam - * Implemented upper-limit on proxy-to-target sessions. - * - * Revision 1.10 2000/05/30 03:12:27 ian - * minor change to stop g++ 2.95.2 complaining about taking the address - * of a member function. - * - * Revision 1.9 1999/12/06 13:52:45 adam - * Modified for new location of YAZ header files. Experimental threaded - * operation. - * - * Revision 1.8 1999/11/10 10:02:34 adam - * Work on proxy. - * - * Revision 1.7 1999/04/21 12:09:01 adam - * Many improvements. Modified to proxy server to work with "sessions" - * based on cookies. - * - * Revision 1.6 1999/04/20 10:30:05 adam - * Implemented various stuff for client and proxy. Updated calls - * to ODR to reflect new name parameter. - * - * Revision 1.5 1999/04/09 11:46:57 adam - * Added object Yaz_Z_Assoc. Much more functional client. - * - * Revision 1.4 1999/03/23 14:17:57 adam - * More work on timeout handling. Work on yaz-client. - * - * Revision 1.3 1999/02/02 14:01:18 adam - * First WIN32 port of YAZ++. - * - * Revision 1.2 1999/01/28 13:08:42 adam - * Yaz_PDU_Assoc better encapsulated. Memory leak fix in - * yaz-socket-manager.cc. - * - * Revision 1.1.1.1 1999/01/28 09:41:07 adam - * First implementation of YAZ++. - * + * $Id: yaz-my-client.cpp,v 1.10 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-my-server.cpp b/src/yaz-my-server.cpp index 0ec90bd..6f6a490 100644 --- a/src/yaz-my-server.cpp +++ b/src/yaz-my-server.cpp @@ -2,79 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-my-server.cpp,v $ - * Revision 1.7 2001-08-13 16:39:12 adam - * PDU_Assoc keeps track of children. Using yaz_log instead of logf. - * - * Revision 1.6 2001/05/17 14:18:03 adam - * New handler for old version item update for server: - * void update_service0 (Z_ExtendedServicesRequest *req, - * Z_IU0Update *io, Z_ExtendedServicesResponse *res) - * - * Revision 1.5 2001/05/03 12:39:39 adam - * Added Update server service. - * - * Revision 1.4 2001/04/05 13:09:44 adam - * Removed ursula dependancy. - * - * Revision 1.3 2001/04/04 14:02:49 adam - * URSULA / Z-ruth service. - * - * Revision 1.2 2001/03/29 15:14:26 adam - * Minor updates. - * - * Revision 1.1 2001/03/27 14:47:45 adam - * New server facility scheme. - * - * Revision 1.15 2001/03/26 14:43:49 adam - * New threaded PDU association. - * - * Revision 1.14 2000/11/01 14:22:59 adam - * Added fd parameter for method IYaz_PDU_Observer::clone. - * - * Revision 1.13 2000/10/11 11:58:16 adam - * Moved header files to include/yaz++. Switched to libtool and automake. - * Configure script creates yaz++-config script. - * - * Revision 1.12 2000/09/21 21:43:20 adam - * Better high-level server API. - * - * Revision 1.11 2000/09/12 16:23:49 adam - * Updated server example. - * - * Revision 1.10 2000/09/12 16:04:17 adam - * Added comstack method for Yaz_PDU_Assoc.. - * - * Revision 1.9 2000/09/12 12:09:53 adam - * More work on high-level server. - * - * Revision 1.8 2000/09/08 10:23:42 adam - * Added skeleton of yaz-z-server. - * - * Revision 1.7 1999/12/06 13:52:45 adam - * Modified for new location of YAZ header files. Experimental threaded - * operation. - * - * Revision 1.6 1999/04/21 12:09:01 adam - * Many improvements. Modified to proxy server to work with "sessions" - * based on cookies. - * - * Revision 1.5 1999/04/09 11:46:57 adam - * Added object Yaz_Z_Assoc. Much more functional client. - * - * Revision 1.4 1999/03/23 14:17:57 adam - * More work on timeout handling. Work on yaz-client. - * - * Revision 1.3 1999/02/02 14:01:22 adam - * First WIN32 port of YAZ++. - * - * Revision 1.2 1999/01/28 13:08:47 adam - * Yaz_PDU_Assoc better encapsulated. Memory leak fix in - * yaz-socket-manager.cc. - * - * Revision 1.1.1.1 1999/01/28 09:41:07 adam - * First implementation of YAZ++. - * + * $Id: yaz-my-server.cpp,v 1.8 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-pdu-assoc-thread.cpp b/src/yaz-pdu-assoc-thread.cpp index d59846c..4a445fd 100644 --- a/src/yaz-pdu-assoc-thread.cpp +++ b/src/yaz-pdu-assoc-thread.cpp @@ -2,16 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-pdu-assoc-thread.cpp,v $ - * Revision 1.3 2001-08-13 16:39:12 adam - * PDU_Assoc keeps track of children. Using yaz_log instead of logf. - * - * Revision 1.2 2001/03/27 14:47:45 adam - * New server facility scheme. - * - * Revision 1.1 2001/03/26 14:43:49 adam - * New threaded PDU association. - * + * $Id: yaz-pdu-assoc-thread.cpp,v 1.4 2001-11-04 22:36:21 adam Exp $ */ #ifdef WIN32 diff --git a/src/yaz-pdu-assoc.cpp b/src/yaz-pdu-assoc.cpp index 17dc1b0..0ed6f29 100644 --- a/src/yaz-pdu-assoc.cpp +++ b/src/yaz-pdu-assoc.cpp @@ -2,86 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-pdu-assoc.cpp,v $ - * Revision 1.24 2001-08-13 16:39:12 adam - * PDU_Assoc keeps track of children. Using yaz_log instead of logf. - * - * Revision 1.23 2001/03/26 14:43:49 adam - * New threaded PDU association. - * - * Revision 1.22 2001/01/29 11:18:24 adam - * Server sets OPTIONS search and present. - * - * Revision 1.21 2000/11/20 14:17:36 adam - * Yet another WIN32 fix for connect notify. - * - * Revision 1.20 2000/11/20 11:27:33 adam - * Fixes for connect operation (timeout and notify fix). - * - * Revision 1.19 2000/11/01 14:22:59 adam - * Added fd parameter for method IYaz_PDU_Observer::clone. - * - * Revision 1.18 2000/10/24 12:29:57 adam - * Fixed bug in proxy where a Yaz_ProxyClient could be owned by - * two Yaz_Proxy's (fatal). - * - * Revision 1.17 2000/10/11 11:58:16 adam - * Moved header files to include/yaz++. Switched to libtool and automake. - * Configure script creates yaz++-config script. - * - * Revision 1.16 2000/09/22 09:54:11 heikki - * minor - * - * Revision 1.15 2000/09/21 21:43:20 adam - * Better high-level server API. - * - * Revision 1.14 2000/09/12 12:09:53 adam - * More work on high-level server. - * - * Revision 1.13 2000/09/08 10:23:42 adam - * Added skeleton of yaz-z-server. - * - * Revision 1.12 2000/09/06 14:23:45 adam - * WIN32 updates. - * - * Revision 1.11 2000/09/04 08:29:22 adam - * Fixed memory leak(s). Added re-use of associations, rather than - * re-init, when maximum number of targets are in use. - * - * Revision 1.10 2000/08/10 08:42:42 adam - * Fixes for {set,get}_APDU_log. - * - * Revision 1.9 1999/12/06 13:52:45 adam - * Modified for new location of YAZ header files. Experimental threaded - * operation. - * - * Revision 1.8 1999/04/28 13:04:03 adam - * Fixed setting of proxy otherInfo so that database(s) are removed. - * - * Revision 1.7 1999/04/21 12:09:01 adam - * Many improvements. Modified to proxy server to work with "sessions" - * based on cookies. - * - * Revision 1.6 1999/04/20 10:30:05 adam - * Implemented various stuff for client and proxy. Updated calls - * to ODR to reflect new name parameter. - *g - * Revision 1.5 1999/04/09 11:46:57 adam - * Added object Yaz_Z_Assoc. Much more functional client. - * - * Revision 1.4 1999/03/23 14:17:57 adam - * More work on timeout handling. Work on yaz-client. - * - * Revision 1.3 1999/02/02 14:01:20 adam - * First WIN32 port of YAZ++. - * - * Revision 1.2 1999/01/28 13:08:44 adam - * Yaz_PDU_Assoc better encapsulated. Memory leak fix in - * yaz-socket-manager.cc. - * - * Revision 1.1.1.1 1999/01/28 09:41:07 adam - * First implementation of YAZ++. - * + * $Id: yaz-pdu-assoc.cpp,v 1.25 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-proxy-main.cpp b/src/yaz-proxy-main.cpp index f6abc77..0487363 100644 --- a/src/yaz-proxy-main.cpp +++ b/src/yaz-proxy-main.cpp @@ -2,50 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-proxy-main.cpp,v $ - * Revision 1.13 2001-04-10 10:48:08 adam - * Fixed problem where proxy could cash bad result sets. - * - * Revision 1.12 2000/10/11 11:58:16 adam - * Moved header files to include/yaz++. Switched to libtool and automake. - * Configure script creates yaz++-config script. - * - * Revision 1.11 2000/09/08 10:23:42 adam - * Added skeleton of yaz-z-server. - * - * Revision 1.10 2000/09/04 08:59:16 adam - * Changed call to logging functions (yaz_ added). - * - * Revision 1.9 2000/08/07 14:19:59 adam - * Fixed serious bug regarding timeouts. Improved logging for proxy. - * - * Revision 1.8 2000/07/04 13:48:49 adam - * Implemented upper-limit on proxy-to-target sessions. - * - * Revision 1.7 1999/12/06 13:52:45 adam - * Modified for new location of YAZ header files. Experimental threaded - * operation. - * - * Revision 1.6 1999/11/10 10:02:34 adam - * Work on proxy. - * - * Revision 1.5 1999/04/21 12:09:01 adam - * Many improvements. Modified to proxy server to work with "sessions" - * based on cookies. - * - * Revision 1.4 1999/04/09 11:46:57 adam - * Added object Yaz_Z_Assoc. Much more functional client. - * - * Revision 1.3 1999/02/02 14:01:21 adam - * First WIN32 port of YAZ++. - * - * Revision 1.2 1999/01/28 13:08:45 adam - * Yaz_PDU_Assoc better encapsulated. Memory leak fix in - * yaz-socket-manager.cc. - * - * Revision 1.1.1.1 1999/01/28 09:41:07 adam - * First implementation of YAZ++. - * + * $Id: yaz-proxy-main.cpp,v 1.14 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index d351988..a73c95a 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -2,97 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-proxy.cpp,v $ - * Revision 1.27 2001-11-02 13:06:29 adam - * Fixed bug in result_set_optimize where LSLB == resultCount. - * - * Revision 1.26 2001/08/13 16:39:12 adam - * PDU_Assoc keeps track of children. Using yaz_log instead of logf. - * - * Revision 1.25 2001/04/25 18:59:30 adam - * Added referenceId handling for server. - * - * Revision 1.24 2001/04/10 10:48:08 adam - * Fixed problem where proxy could cash bad result sets. - * - * Revision 1.23 2001/03/26 14:43:49 adam - * New threaded PDU association. - * - * Revision 1.22 2000/11/20 11:27:33 adam - * Fixes for connect operation (timeout and notify fix). - * - * Revision 1.21 2000/11/01 14:22:59 adam - * Added fd parameter for method IYaz_PDU_Observer::clone. - * - * Revision 1.20 2000/10/24 12:29:57 adam - * Fixed bug in proxy where a Yaz_ProxyClient could be owned by - * two Yaz_Proxy's (fatal). - * - * Revision 1.19 2000/10/11 11:58:16 adam - * Moved header files to include/yaz++. Switched to libtool and automake. - * Configure script creates yaz++-config script. - * - * Revision 1.18 2000/09/08 10:23:42 adam - * Added skeleton of yaz-z-server. - * - * Revision 1.17 2000/09/05 13:57:28 adam - * Fixed get_otherInfoAPDU to return otherInfo for extended services. - * - * Revision 1.16 2000/09/04 08:29:22 adam - * Fixed memory leak(s). Added re-use of associations, rather than - * re-init, when maximum number of targets are in use. - * - * Revision 1.15 2000/08/31 14:41:55 adam - * Proxy no longer generates cookies (it's up to the client). Proxy - * re-opens if target new op is started before previous operation finishes. - * - * Revision 1.14 2000/08/10 08:42:42 adam - * Fixes for {set,get}_APDU_log. - * - * Revision 1.13 2000/08/07 14:19:59 adam - * Fixed serious bug regarding timeouts. Improved logging for proxy. - * - * Revision 1.12 2000/07/04 13:48:49 adam - * Implemented upper-limit on proxy-to-target sessions. - * - * Revision 1.11 1999/12/06 13:52:45 adam - * Modified for new location of YAZ header files. Experimental threaded - * operation. - * - * Revision 1.10 1999/11/10 10:02:34 adam - * Work on proxy. - * - * Revision 1.9 1999/09/13 12:53:44 adam - * Proxy removes OtherInfo Proxy Address and Session ID. Other - * Otherinfo remains untouched. - * - * Revision 1.8 1999/05/04 10:53:00 adam - * Changed the way the PROXY behaves when lost cookie is received. - * - * Revision 1.7 1999/04/28 13:31:17 adam - * Better result set optimisation for proxy. - * - * Revision 1.6 1999/04/27 07:52:13 adam - * Improved proxy; added query match for result set re-use. - * - * Revision 1.5 1999/04/21 12:09:01 adam - * Many improvements. Modified to proxy server to work with "sessions" - * based on cookies. - * - * Revision 1.4 1999/04/20 10:30:05 adam - * Implemented various stuff for client and proxy. Updated calls - * to ODR to reflect new name parameter. - * - * Revision 1.3 1999/04/09 11:46:57 adam - * Added object Yaz_Z_Assoc. Much more functional client. - * - * Revision 1.2 1999/01/28 13:08:46 adam - * Yaz_PDU_Assoc better encapsulated. Memory leak fix in - * yaz-socket-manager.cc. - * - * Revision 1.1.1.1 1999/01/28 09:41:07 adam - * First implementation of YAZ++. - * + * $Id: yaz-proxy.cpp,v 1.28 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-socket-manager.cpp b/src/yaz-socket-manager.cpp index d951926..5f0f7df 100644 --- a/src/yaz-socket-manager.cpp +++ b/src/yaz-socket-manager.cpp @@ -1,61 +1,8 @@ /* - * Copyright (c) 1998-2000, Index Data. + * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-socket-manager.cpp,v $ - * Revision 1.16 2001-08-13 16:39:12 adam - * PDU_Assoc keeps track of children. Using yaz_log instead of logf. - * - * Revision 1.15 2001/03/26 14:43:49 adam - * New threaded PDU association. - * - * Revision 1.14 2000/11/20 14:17:36 adam - * Yet another WIN32 fix for connect notify. - * - * Revision 1.13 2000/11/20 11:27:33 adam - * Fixes for connect operation (timeout and notify fix). - * - * Revision 1.12 2000/10/24 12:29:57 adam - * Fixed bug in proxy where a Yaz_ProxyClient could be owned by - * two Yaz_Proxy's (fatal). - * - * Revision 1.11 2000/10/11 11:58:17 adam - * Moved header files to include/yaz++. Switched to libtool and automake. - * Configure script creates yaz++-config script. - * - * Revision 1.10 2000/09/08 10:23:42 adam - * Added skeleton of yaz-z-server. - * - * Revision 1.9 2000/08/07 14:19:59 adam - * Fixed serious bug regarding timeouts. Improved logging for proxy. - * - * Revision 1.8 1999/12/06 13:52:45 adam - * Modified for new location of YAZ header files. Experimental threaded - * operation. - * - * Revision 1.7 1999/04/28 13:02:08 adam - * Added include of string.h. - * - * Revision 1.6 1999/04/21 12:09:01 adam - * Many improvements. Modified to proxy server to work with "sessions" - * based on cookies. - * - * Revision 1.5 1999/04/09 11:46:57 adam - * Added object Yaz_Z_Assoc. Much more functional client. - * - * Revision 1.4 1999/03/23 14:17:57 adam - * More work on timeout handling. Work on yaz-client. - * - * Revision 1.3 1999/02/02 14:01:23 adam - * First WIN32 port of YAZ++. - * - * Revision 1.2 1999/01/28 13:08:48 adam - * Yaz_PDU_Assoc better encapsulated. Memory leak fix in - * yaz-socket-manager.cc. - * - * Revision 1.1.1.1 1999/01/28 09:41:07 adam - * First implementation of YAZ++. - * + * $Id: yaz-socket-manager.cpp,v 1.17 2001-11-04 22:36:21 adam Exp $ */ #include #ifdef WIN32 @@ -201,6 +148,9 @@ int Yaz_SocketManager::processEvent() timeout_this = 1; if (!timeout || timeout_this < timeout) timeout = timeout_this; + p->timeout_this = timeout_this; + yaz_log (m_log, "Yaz_SocketManager::select timeout_this=%d", + p->timeout_this); } } if (!no) @@ -215,7 +165,8 @@ int Yaz_SocketManager::processEvent() to.tv_sec = timeout; to.tv_usec = 0; - yaz_log (m_log, "Yaz_SocketManager::select no=%d timeout=%d", no, timeout); + yaz_log (m_log, "Yaz_SocketManager::select begin no=%d timeout=%d", + no, timeout); while ((res = select(max + 1, &in, &out, &except, timeout ? &to : 0)) < 0) if (errno != EINTR) return -1; @@ -241,12 +192,12 @@ int Yaz_SocketManager::processEvent() event->event = mask; putEvent (event); } - else if (p->timeout && p->last_activity && - now >= p->last_activity + (int) (p->timeout)) + else if (res == 0 && p->timeout && p->timeout_this == timeout) { YazSocketEvent *event = new YazSocketEvent; + assert (p->last_activity); yaz_log (m_log, "timeout, now = %ld last_activity=%ld timeout=%d", - now, p->last_activity, p->timeout); + now, p->last_activity, p->timeout); p->last_activity = now; event->observer = p->observer; event->event = YAZ_SOCKET_OBSERVE_TIMEOUT; @@ -259,7 +210,8 @@ int Yaz_SocketManager::processEvent() delete event; return 1; } - return 0; + yaz_log (LOG_WARN, "unhandled event in processEvent"); + return 1; } diff --git a/src/yaz-z-assoc.cpp b/src/yaz-z-assoc.cpp index e9f4b19..052c059 100644 --- a/src/yaz-z-assoc.cpp +++ b/src/yaz-z-assoc.cpp @@ -2,79 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-z-assoc.cpp,v $ - * Revision 1.21 2001-08-13 16:39:12 adam - * PDU_Assoc keeps track of children. Using yaz_log instead of logf. - * - * Revision 1.20 2001/04/25 18:59:30 adam - * Added referenceId handling for server. - * - * Revision 1.19 2001/03/27 14:47:45 adam - * New server facility scheme. - * - * Revision 1.18 2001/03/26 14:43:49 adam - * New threaded PDU association. - * - * Revision 1.17 2001/01/04 14:25:25 heikki - * No SIGPIPES in windows... - * - * Revision 1.16 2000/12/14 16:00:39 adam - * Ignoring signal SIGPIPE. - * - * Revision 1.15 2000/10/11 11:58:17 adam - * Moved header files to include/yaz++. Switched to libtool and automake. - * Configure script creates yaz++-config script. - * - * Revision 1.14 2000/09/12 16:40:33 heikki - * minor - * - * Revision 1.13 2000/09/08 10:23:42 adam - * Added skeleton of yaz-z-server. - * - * Revision 1.12 2000/09/05 13:57:28 adam - * Fixed get_otherInfoAPDU to return otherInfo for extended services. - * - * Revision 1.11 2000/09/04 08:59:16 adam - * Changed call to logging functions (yaz_ added). - * - * Revision 1.10 2000/09/04 08:29:22 adam - * Fixed memory leak(s). Added re-use of associations, rather than - * re-init, when maximum number of targets are in use. - * - * Revision 1.9 2000/08/10 08:42:42 adam - * Fixes for {set,get}_APDU_log. - * - * Revision 1.8 2000/08/07 14:19:59 adam - * Fixed serious bug regarding timeouts. Improved logging for proxy. - * - * Revision 1.7 2000/05/10 11:36:58 ian - * Added default parameters for refid to request functions. - * Added default parameter for result set name to search and present request. - * Commented out forced logging of PDU contents. - * Added send_deleteResultSetRequest - * - * Revision 1.6 1999/12/06 13:52:45 adam - * Modified for new location of YAZ header files. Experimental threaded - * operation. - * - * Revision 1.5 1999/11/10 10:02:34 adam - * Work on proxy. - * - * Revision 1.4 1999/09/13 12:53:44 adam - * Proxy removes OtherInfo Proxy Address and Session ID. Other - * Otherinfo remains untouched. - * - * Revision 1.3 1999/04/21 12:09:01 adam - * Many improvements. Modified to proxy server to work with "sessions" - * based on cookies. - * - * Revision 1.2 1999/04/20 10:30:05 adam - * Implemented various stuff for client and proxy. Updated calls - * to ODR to reflect new name parameter. - * - * Revision 1.1 1999/04/09 11:46:57 adam - * Added object Yaz_Z_Assoc. Much more functional client. - * + * $Id: yaz-z-assoc.cpp,v 1.22 2001-11-04 22:36:21 adam Exp $ */ #include @@ -89,7 +17,6 @@ int Yaz_Z_Assoc::yaz_init_func() #ifndef WIN32 signal (SIGPIPE, SIG_IGN); #endif - nmem_init(); return 1; } diff --git a/src/yaz-z-query.cpp b/src/yaz-z-query.cpp index 9846d84..c94bd11 100644 --- a/src/yaz-z-query.cpp +++ b/src/yaz-z-query.cpp @@ -1,42 +1,8 @@ /* - * Copyright (c) 1998-2000, Index Data. + * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-z-query.cpp,v $ - * Revision 1.9 2000-10-11 11:58:17 adam - * Moved header files to include/yaz++. Switched to libtool and automake. - * Configure script creates yaz++-config script. - * - * Revision 1.8 2000/09/08 10:23:42 adam - * Added skeleton of yaz-z-server. - * - * Revision 1.7 2000/05/10 11:36:58 ian - * Added default parameters for refid to request functions. - * Added default parameter for result set name to search and present request. - * Commented out forced logging of PDU contents. - * Added send_deleteResultSetRequest - * - * Revision 1.6 1999/12/06 13:52:45 adam - * Modified for new location of YAZ header files. Experimental threaded - * operation. - * - * Revision 1.5 1999/04/27 07:52:13 adam - * Improved proxy; added query match for result set re-use. - * - * Revision 1.4 1999/04/21 12:09:01 adam - * Many improvements. Modified to proxy server to work with "sessions" - * based on cookies. - * - * Revision 1.3 1999/04/20 10:30:05 adam - * Implemented various stuff for client and proxy. Updated calls - * to ODR to reflect new name parameter. - * - * Revision 1.2 1999/04/09 11:46:57 adam - * Added object Yaz_Z_Assoc. Much more functional client. - * - * Revision 1.1 1999/03/23 14:17:57 adam - * More work on timeout handling. Work on yaz-client. - * + * $Id: yaz-z-query.cpp,v 1.10 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-z-server-ill.cpp b/src/yaz-z-server-ill.cpp index f7797e4..1751933 100644 --- a/src/yaz-z-server-ill.cpp +++ b/src/yaz-z-server-ill.cpp @@ -2,25 +2,7 @@ * Copyright (c) 2000-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-z-server-ill.cpp,v $ - * Revision 1.6 2001-05-03 12:39:39 adam - * Added Update server service. - * - * Revision 1.5 2001/04/25 19:40:18 adam - * Added refernceId handling for other services. - * - * Revision 1.4 2001/04/04 14:02:49 adam - * URSULA / Z-ruth service. - * - * Revision 1.3 2001/04/03 14:37:19 adam - * More work ILL-service. - * - * Revision 1.2 2001/03/29 15:14:26 adam - * Minor updates. - * - * Revision 1.1 2001/03/27 14:47:45 adam - * New server facility scheme. - * + * $Id: yaz-z-server-ill.cpp,v 1.7 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-z-server-sr.cpp b/src/yaz-z-server-sr.cpp index 9750e16..105f777 100644 --- a/src/yaz-z-server-sr.cpp +++ b/src/yaz-z-server-sr.cpp @@ -2,15 +2,7 @@ * Copyright (c) 2000-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-z-server-sr.cpp,v $ - * Revision 1.3 2001-04-25 18:59:30 adam - * Added referenceId handling for server. - * - * Revision 1.2 2001/04/04 14:02:49 adam - * URSULA / Z-ruth service. - * - * Revision 1.1 2001/03/27 15:02:14 adam - * New server facility scheme. + * $Id: yaz-z-server-sr.cpp,v 1.4 2001-11-04 22:36:21 adam Exp $ * */ diff --git a/src/yaz-z-server-update.cpp b/src/yaz-z-server-update.cpp index 8e82e5b..fa7101d 100644 --- a/src/yaz-z-server-update.cpp +++ b/src/yaz-z-server-update.cpp @@ -2,15 +2,7 @@ * Copyright (c) 2000-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-z-server-update.cpp,v $ - * Revision 1.2 2001-05-17 14:18:03 adam - * New handler for old version item update for server: - * void update_service0 (Z_ExtendedServicesRequest *req, - * Z_IU0Update *io, Z_ExtendedServicesResponse *res) - * - * Revision 1.1 2001/05/03 12:42:57 adam - * Added update server service. - * + * $Id: yaz-z-server-update.cpp,v 1.3 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-z-server-ursula.cpp b/src/yaz-z-server-ursula.cpp index 5476c85..882f9fc 100644 --- a/src/yaz-z-server-ursula.cpp +++ b/src/yaz-z-server-ursula.cpp @@ -2,22 +2,7 @@ * Copyright (c) 2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-z-server-ursula.cpp,v $ - * Revision 1.5 2001-08-13 16:39:12 adam - * PDU_Assoc keeps track of children. Using yaz_log instead of logf. - * - * Revision 1.4 2001/04/25 19:40:18 adam - * Added refernceId handling for other services. - * - * Revision 1.3 2001/04/11 12:33:42 heikki - * Working on ursula things - * - * Revision 1.2 2001/04/05 15:12:24 adam - * WIN32 updates. - * - * Revision 1.1 2001/04/04 14:02:49 adam - * URSULA / Z-ruth service. - * + * $Id: yaz-z-server-ursula.cpp,v 1.6 2001-11-04 22:36:21 adam Exp $ */ #include diff --git a/src/yaz-z-server.cpp b/src/yaz-z-server.cpp index ae7e94a..98e5929 100644 --- a/src/yaz-z-server.cpp +++ b/src/yaz-z-server.cpp @@ -2,45 +2,7 @@ * Copyright (c) 2000-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-z-server.cpp,v $ - * Revision 1.12 2001-04-25 19:40:18 adam - * Added refernceId handling for other services. - * - * Revision 1.11 2001/04/12 15:12:10 heikki - * minor ursula stuff - * - * Revision 1.10 2001/04/04 14:02:49 adam - * URSULA / Z-ruth service. - * - * Revision 1.9 2001/03/29 15:14:26 adam - * Minor updates. - * - * Revision 1.8 2001/03/27 14:47:45 adam - * New server facility scheme. - * - * Revision 1.7 2001/03/26 14:43:49 adam - * New threaded PDU association. - * - * Revision 1.6 2001/01/29 11:18:24 adam - * Server sets OPTIONS search and present. - * - * Revision 1.5 2000/10/24 12:29:57 adam - * Fixed bug in proxy where a Yaz_ProxyClient could be owned by - * two Yaz_Proxy's (fatal). - * - * Revision 1.4 2000/10/11 11:58:17 adam - * Moved header files to include/yaz++. Switched to libtool and automake. - * Configure script creates yaz++-config script. - * - * Revision 1.3 2000/09/21 21:43:20 adam - * Better high-level server API. - * - * Revision 1.2 2000/09/12 12:09:53 adam - * More work on high-level server. - * - * Revision 1.1 2000/09/08 10:23:42 adam - * Added skeleton of yaz-z-server. - * + * $Id: yaz-z-server.cpp,v 1.13 2001-11-04 22:36:21 adam Exp $ */ #include @@ -130,7 +92,7 @@ void Yaz_Z_Server::recv_Z_PDU (Z_APDU *apdu_request) } if (!taken) { - yaz_log (LOG_LOG, "unhandled request = %d", apdu_request->which); + yaz_log (LOG_WARN, "unhandled request = %d", apdu_request->which); delete this; } } diff --git a/yaz.m4 b/yaz.m4 index f4e8e6c..a245efc 100644 --- a/yaz.m4 +++ b/yaz.m4 @@ -1,4 +1,4 @@ -## $Id: yaz.m4,v 1.2 2001-03-26 14:43:49 adam Exp $ +## $Id: yaz.m4,v 1.3 2001-11-04 22:36:21 adam Exp $ ## # Use this m4 funciton for autoconf if you use YAZ in your own # configure script. -- 1.7.10.4