From f0fb2a160e8c8cbb1147d476ae206ebcedbf8ecf Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 8 Mar 2007 09:43:37 +0000 Subject: [PATCH] Fix for bug #948. Other problem is that frontend session was terminated by SRU filter. That's not really allowed. The fix is to simply remove calls to session().close(). This also means more efficient operation because HTTP keep-alive is operating. --- src/filter_sru_to_z3950.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/filter_sru_to_z3950.cpp b/src/filter_sru_to_z3950.cpp index a0a7d82..a4f2f6d 100644 --- a/src/filter_sru_to_z3950.cpp +++ b/src/filter_sru_to_z3950.cpp @@ -1,4 +1,4 @@ -/* $Id: filter_sru_to_z3950.cpp,v 1.29 2007-01-25 14:05:54 adam Exp $ +/* $Id: filter_sru_to_z3950.cpp,v 1.30 2007-03-08 09:43:37 adam Exp $ Copyright (c) 2005-2007, Index Data. See the LICENSE file for details @@ -183,7 +183,7 @@ void yf::SRUtoZ3950::Impl::process(mp::Package &package) sruinfo, explainnode); mp_util::build_sru_response(package, odr_en, soap, sru_pdu_res, charset, stylesheet); - package.session().close(); + // package.session().close(); return; } @@ -261,7 +261,6 @@ void yf::SRUtoZ3950::Impl::process(mp::Package &package) sru_pdu_res = yaz_srw_get(odr_en, Z_SRW_explain_response); // TODO: make nice diagnostic return package - package.session().close(); return; } @@ -313,7 +312,6 @@ yf::SRUtoZ3950::Impl::z3950_init_request(mp::Package &package, &(sru_pdu_res->u.response->diagnostics), &(sru_pdu_res->u.response->num_diagnostics), 2, 0); - package.session().close(); return false; } @@ -329,16 +327,12 @@ yf::SRUtoZ3950::Impl::z3950_init_request(mp::Package &package, &(sru_pdu_res->u.response->diagnostics), &(sru_pdu_res->u.response->num_diagnostics), 2, 0); - package.session().close(); return false; } bool yf::SRUtoZ3950::Impl::z3950_close_request(mp::Package &package) const { - // close SRU package - package.session().close(); - // prepare and close Z3950 package Package z3950_package(package.session(), package.origin()); z3950_package.copy_filter(package); @@ -430,7 +424,6 @@ yf::SRUtoZ3950::Impl::z3950_search_request(mp::Package &package, &(sru_pdu_res->u.response->diagnostics), &(sru_pdu_res->u.response->num_diagnostics), 2, 0); - package.session().close(); return false; } @@ -606,10 +599,9 @@ yf::SRUtoZ3950::Impl::z3950_present_request(mp::Package &package, &(sru_pdu_res->u.response->diagnostics), &(sru_pdu_res->u.response->num_diagnostics), 2, 0); - package.session().close(); return false; } - + // everything fine, continuing -- 1.7.10.4