X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-proxy.cpp;h=a73c95a5ce4caa3983581e6df2fb490b38de96f9;hb=966d1a0443071c2b75426d0214bfb9960c5c3fba;hp=d501230bf3e621d50cac7ac1c826cc15957f0d15;hpb=c96f00d22f0af97ad7fd5d8687fa0b65b67de77e;p=yazpp-moved-to-github.git diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index d501230..a73c95a 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -2,94 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Log: yaz-proxy.cpp,v $ - * 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 @@ -360,7 +273,7 @@ Z_APDU *Yaz_Proxy::result_set_optimize(Z_APDU *apdu) m_client->m_sr_transform = 1; return new_apdu; } - else if (m_client->m_last_resultCount > *sr->largeSetLowerBound || + else if (m_client->m_last_resultCount >= *sr->largeSetLowerBound || m_client->m_last_resultCount == 0) { // large set @@ -460,6 +373,8 @@ void Yaz_Proxy::shutdown() // only keep if keep_alive flag and cookie is set... if (m_keepalive && m_client && m_client->m_cookie[0]) { + yaz_log (LOG_LOG, "shutdown - keepalive this=%p, m_server=%p", + this, m_client->m_server); if (m_client->m_waiting == 2) abort(); // Tell client (if any) that no server connection is there.. @@ -474,7 +389,8 @@ void Yaz_Proxy::shutdown() } else if (!m_parent) { - abort(); + yaz_log (LOG_LOG, "abort %p", this); + abort(); } delete this; }