diff options
| author | Justin Ross <jross@apache.org> | 2013-03-18 19:18:39 +0000 |
|---|---|---|
| committer | Justin Ross <jross@apache.org> | 2013-03-18 19:18:39 +0000 |
| commit | 9d051c20d74f0fae7a00ffb28efcd6af68080122 (patch) | |
| tree | c659ed64a0cb067dd116540edf6d826ce0615bcc /cpp | |
| parent | 7f952ae1ba814f29ee7107fdccb83d17eb13a629 (diff) | |
| download | qpid-python-9d051c20d74f0fae7a00ffb28efcd6af68080122.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/qpid@1457924 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/src/qpid/xml/XmlExchange.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpp/src/qpid/xml/XmlExchange.cpp b/cpp/src/qpid/xml/XmlExchange.cpp index 1f6bf6de05..fb6c326327 100644 --- a/cpp/src/qpid/xml/XmlExchange.cpp +++ b/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); |
