summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorJonathan Robie <jonathan@apache.org>2010-01-18 17:42:05 +0000
committerJonathan Robie <jonathan@apache.org>2010-01-18 17:42:05 +0000
commitfc991a682e835ebb5ccc74d76825362ceafa833a (patch)
treea3cf331b73651a0ba8331beb463637b4c5730674 /qpid/cpp
parentbfda4db8b99bbc057efccfe20cfcc8e270ba7592 (diff)
downloadqpid-python-fc991a682e835ebb5ccc74d76825362ceafa833a.tar.gz
Applied John Dunning's patch from https://issues.apache.org/jira/browse/QPID-2335.
Allows management tools to report the query for a binding. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@900475 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/xml/XmlExchange.cpp5
-rw-r--r--qpid/cpp/src/qpid/xml/XmlExchange.h7
2 files changed, 8 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/xml/XmlExchange.cpp b/qpid/cpp/src/qpid/xml/XmlExchange.cpp
index 472ca28954..6771767969 100644
--- a/qpid/cpp/src/qpid/xml/XmlExchange.cpp
+++ b/qpid/cpp/src/qpid/xml/XmlExchange.cpp
@@ -82,8 +82,8 @@ bool XmlExchange::bind(Queue::shared_ptr queue, const string& routingKey, const
XmlBinding::vector::ConstPtr p = bindings.snapshot();
if (!p || std::find_if(p->begin(), p->end(), MatchQueue(queue)) == p->end()) {
Query query(xqilla.parse(X(queryText.c_str())));
- XmlBinding::shared_ptr binding(new XmlBinding (routingKey, queue, this, query));
- bindings.add(binding);
+ XmlBinding::shared_ptr binding(new XmlBinding (routingKey, queue, this, *bindingArguments, query));
+
QPID_LOG(trace, "Bound successfully with query: " << queryText );
binding->parse_message_content = false;
@@ -101,6 +101,7 @@ bool XmlExchange::bind(Queue::shared_ptr queue, const string& routingKey, const
}
}
+ bindings.add(binding);
if (mgmtExchange != 0) {
mgmtExchange->inc_bindingCount();
((_qmf::Queue*) queue->GetManagementObject())->inc_bindingCount();
diff --git a/qpid/cpp/src/qpid/xml/XmlExchange.h b/qpid/cpp/src/qpid/xml/XmlExchange.h
index 38cb7699b6..802afddeab 100644
--- a/qpid/cpp/src/qpid/xml/XmlExchange.h
+++ b/qpid/cpp/src/qpid/xml/XmlExchange.h
@@ -49,8 +49,11 @@ class XmlExchange : public virtual Exchange {
boost::shared_ptr<XQQuery> xquery;
bool parse_message_content;
- XmlBinding(const std::string& key, const Queue::shared_ptr queue, Exchange* parent, Query query):
- Binding(key, queue, parent), xquery(query), parse_message_content(true) {}
+ XmlBinding(const std::string& key, const Queue::shared_ptr queue, Exchange* parent,
+ const ::qpid::framing::FieldTable& _arguments, Query query):
+ Binding(key, queue, parent, _arguments),
+ xquery(query),
+ parse_message_content(true) {}
};