summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/SubscriptionManager.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-11-05 21:12:54 +0000
committerGordon Sim <gsim@apache.org>2008-11-05 21:12:54 +0000
commit359f60c318627900c3ac216496486c42d1a4df8a (patch)
tree879b78ce5d2cc1344f4840dbdbf83da66605ba47 /cpp/src/qpid/client/SubscriptionManager.cpp
parent06c6c1db04d562b6cad0293cb4c5f8e40dde7a19 (diff)
downloadqpid-python-359f60c318627900c3ac216496486c42d1a4df8a.tar.gz
Added ability to release messages through the Subscription class (+test)
Added another mode for managing completion (+test) Fixed regression where bytes credit was not reallocated in windowing mode after an accept/release Fixed regression where subscribe request is issued before listener is registered with dispatcher git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711698 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/SubscriptionManager.cpp')
-rw-r--r--cpp/src/qpid/client/SubscriptionManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/SubscriptionManager.cpp b/cpp/src/qpid/client/SubscriptionManager.cpp
index 6fa1973b9d..7445202ec3 100644
--- a/cpp/src/qpid/client/SubscriptionManager.cpp
+++ b/cpp/src/qpid/client/SubscriptionManager.cpp
@@ -44,6 +44,8 @@ Subscription SubscriptionManager::subscribe(
std::string name=n.empty() ? q:n;
boost::intrusive_ptr<SubscriptionImpl> si = new SubscriptionImpl(*this, q, ss, name, &listener);
dispatcher.listen(si);
+ //issue subscription request after listener is registered with dispatcher
+ si->subscribe();
return subscriptions[name] = Subscription(si.get());
}
@@ -53,6 +55,7 @@ Subscription SubscriptionManager::subscribe(
std::string name=n.empty() ? q:n;
lq.queue=session.getExecution().getDemux().add(name, ByTransferDest(name));
boost::intrusive_ptr<SubscriptionImpl> si = new SubscriptionImpl(*this, q, ss, name, 0);
+ si->subscribe();
lq.subscription = Subscription(si.get());
return subscriptions[name] = lq.subscription;
}