X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FConnectors.cc;h=6c1dade6bc3da79006227b3a4d85298c2cfe133b;hb=c844d796ea6387aa652df2f3e5bc3026c3c8a7f3;hp=4c5a3ea3f7cd7e68263035c677371a9553b868ee;hpb=1f18b34d44aef4554ad8b226b5e2815286d16e8c;p=senf.git 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(); + } } ///////////////////////////////////////////////////////////////////////////