From 2deb4832b4894bb2a5123daaffd54d6da652fae3 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 23 Jan 2009 14:08:42 +0000 Subject: QPID-1613: Ensure that the rule registered with the demuxer for LocalQueue subscriptions is removed when they are cancelled. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@737028 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/SubscriptionImpl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cpp/src/qpid/client/SubscriptionImpl.cpp') diff --git a/cpp/src/qpid/client/SubscriptionImpl.cpp b/cpp/src/qpid/client/SubscriptionImpl.cpp index 5ea87110c2..e09a4c142e 100644 --- a/cpp/src/qpid/client/SubscriptionImpl.cpp +++ b/cpp/src/qpid/client/SubscriptionImpl.cpp @@ -145,5 +145,15 @@ void SubscriptionImpl::received(Message& m) { } } +Demux::QueuePtr SubscriptionImpl::divert() +{ + demuxRule = std::auto_ptr(new ScopedDivert(name, manager.getSession().getExecution().getDemux())); + return demuxRule->getQueue(); +} + +void SubscriptionImpl::cancelDiversion() { + demuxRule.reset(); +} + }} // namespace qpid::client -- cgit v1.2.1