From: g0dil Date: Wed, 1 Jul 2009 11:29:12 +0000 (+0000) Subject: PPI: BUGFIX: Fix unthrottling when mixing multiple auto-forwarding routes with native... X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=c844d796ea6387aa652df2f3e5bc3026c3c8a7f3;p=senf.git PPI: BUGFIX: Fix unthrottling when mixing multiple auto-forwarding routes with native throttling git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1253 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/Connectors.cc b/PPI/Connectors.cc index 4c5a3ea..6c1dade 100644 --- a/PPI/Connectors.cc +++ b/PPI/Connectors.cc @@ -120,19 +120,12 @@ prefix_ void senf::ppi::connector::PassiveConnector::v_unthrottleEvent() prefix_ void senf::ppi::connector::PassiveConnector::notifyUnthrottle() { - if (throttled() && !nativeThrottled_) { - Routes::const_iterator i (routes_.begin()); - Routes::const_iterator const i_end (routes_.end()); - for (; i != i_end; ++i) - if ((*i)->throttled()) - break; - if (i == i_end) { - remoteThrottled_ = false; - emitUnthrottle(); - } - } - else + if (std::find_if(routes_.begin(), routes_.end(), + boost::bind(&ForwardingRoute::throttled, _1)) == routes_.end()) { remoteThrottled_ = false; + if (!nativeThrottled_) + emitUnthrottle(); + } } ///////////////////////////////////////////////////////////////////////////