From: Adam Dickmeiss Date: Tue, 17 Nov 2015 19:09:42 +0000 (+0100) Subject: limit=0 means unlimited MP-632 X-Git-Tag: v1.11.0~2 X-Git-Url: http://git.indexdata.com/?p=metaproxy-moved-to-github.git;a=commitdiff_plain;h=86ca80da550dc8b26d253b74f43d8ff376216ab2 limit=0 means unlimited MP-632 --- diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index ee36538..6549ac0 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -427,9 +427,10 @@ void yf::FrontendNet::ZAssocChild::recv_GDU(Z_GDU *z_pdu, int len) { if (mp::util::match_ip(it->pattern, peername)) { - if (it->verbose > 1 || (con_sz >= it->value && it->verbose > 0)) + if (it->verbose > 1 || + (it->value && con_sz >= it->value && it->verbose > 0)) yaz_log(YLOG_LOG, "http-req-max pattern=%s ip=%s con_sz=%d value=%d", it->pattern.c_str(), peername.c_str(), con_sz, it->value); - if (con_sz < it->value) + if (it->value == 0 || con_sz < it->value) break; mp::odr o; Z_GDU *gdu_res = o.create_HTTP_Response(m_session, hreq, 500); @@ -520,9 +521,10 @@ yazpp_1::IPDU_Observer *yf::FrontendNet::ZAssocServer::sessionNotify( { if (mp::util::match_ip(it->pattern, peername)) { - if (it->verbose > 1 || (con_sz >= it->value && it->verbose > 0)) + if (it->verbose > 1 || + (it->value && con_sz >= it->value && it->verbose > 0)) yaz_log(YLOG_LOG, "connect-max pattern=%s ip=%s con_sz=%d value=%d", it->pattern.c_str(), peername, con_sz, it->value); - if (con_sz < it->value) + if (it->value == 0 || con_sz < it->value) break; return 0; }