summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Ross <jross@apache.org>2013-03-18 19:18:39 +0000
committerJustin Ross <jross@apache.org>2013-03-18 19:18:39 +0000
commitb31130203c660351313fa931ea30a8b79e813fef (patch)
tree769f4240ab36bc26a49c2c867a4b1e790dc7a8ba
parent84c34805896806982d1d2c232fd197b17b0d909a (diff)
downloadqpid-python-b31130203c660351313fa931ea30a8b79e813fef.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1457924 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/xml/XmlExchange.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/xml/XmlExchange.cpp b/qpid/cpp/src/qpid/xml/XmlExchange.cpp
index 1f6bf6de05..fb6c326327 100644
--- a/qpid/cpp/src/qpid/xml/XmlExchange.cpp
+++ b/qpid/cpp/src/qpid/xml/XmlExchange.cpp
@@ -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);