You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jr...@apache.org on 2013/03/18 20:18:40 UTC
svn commit: r1457924 - /qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp
Author: jross
Date: Mon Mar 18 19:18:39 2013
New Revision: 1457924
URL: http://svn.apache.org/r1457924
Log:
QPID-4658: Update statistics even when no binding key matches routing key
This is a patch from Pavel Moravec. Thanks to Ernie Allen for testing
it and fixit it for latest trunk.
Modified:
qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp?rev=1457924&r1=1457923&r2=1457924&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp Mon Mar 18 19:18:39 2013
@@ -321,14 +321,16 @@ void XmlExchange::route(Deliverable& msg
{
RWlock::ScopedRlock l(lock);
p = bindingsMap[routingKey].snapshot();
- if (!p.get()) return;
}
- for (std::vector<XmlBinding::shared_ptr>::const_iterator i = p->begin(); i != p->end(); i++) {
- if (matches((*i)->xquery, msg, (*i)->parse_message_content)) {
- b->push_back(*i);
- }
+ if (p.get()) {
+ for (std::vector<XmlBinding::shared_ptr>::const_iterator i = p->begin(); i != p->end(); i++) {
+ if (matches((*i)->xquery, msg, (*i)->parse_message_content)) {
+ b->push_back(*i);
+ }
+ }
}
+ // else allow stats to be counted, even for non-matched messages
doRoute(msg, b);
} catch (...) {
QPID_LOG(warning, "XMLExchange " << getName() << ": exception routing message with query " << routingKey);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org