From bdd5283295ee58a15784958e5448a08a6500d5a3 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 30 Jun 2010 14:30:02 +0200 Subject: [PATCH] multi: init handshake always return init response --- src/filter_multi.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/filter_multi.cpp b/src/filter_multi.cpp index 0ee8372..9c1233f 100644 --- a/src/filter_multi.cpp +++ b/src/filter_multi.cpp @@ -461,8 +461,6 @@ void yf::Multi::Frontend::init(mp::Package &package, Z_GDU *gdu) bit = m_backend_list.erase(bit); continue; } - no_succeeded++; - Z_GDU *gdu = p->response().get(); if (gdu && gdu->which == Z_GDU_Z3950 && gdu->u.z3950->which == Z_APDU_initResponse) @@ -481,28 +479,30 @@ void yf::Multi::Frontend::init(mp::Package &package, Z_GDU *gdu) for (i = 0; i <= Z_ProtocolVersion_3; i++) if (!ODR_MASK_GET(b_resp->protocolVersion, i)) ODR_MASK_CLEAR(f_resp->protocolVersion, i); - // reject if any of the backends reject - if (!*b_resp->result) - *f_resp->result = 0; + if (*b_resp->result) + no_succeeded++; + else + no_failed++; } else - { - // if any target does not return init return that (close or - // similar ) - package.response() = p->response(); - return; - } + no_failed++; bit++; } if (m_p->m_hide_unavailable) { if (no_succeeded == 0) + { + *f_resp->result = 0; package.session().close(); + } } else { if (no_failed) + { + *f_resp->result = 0; package.session().close(); + } } package.response() = f_apdu; } -- 1.7.10.4