summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/LocalQueue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/client/LocalQueue.cpp')
-rw-r--r--cpp/src/qpid/client/LocalQueue.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/qpid/client/LocalQueue.cpp b/cpp/src/qpid/client/LocalQueue.cpp
index 99ab6f0133..229d3766ef 100644
--- a/cpp/src/qpid/client/LocalQueue.cpp
+++ b/cpp/src/qpid/client/LocalQueue.cpp
@@ -22,13 +22,15 @@
#include "qpid/Exception.h"
#include "qpid/framing/FrameSet.h"
#include "qpid/framing/reply_exceptions.h"
+#include "HandlePrivate.h"
+#include "SubscriptionImpl.h"
namespace qpid {
namespace client {
using namespace framing;
-LocalQueue::LocalQueue(AckPolicy a) : autoAck(a) {}
+LocalQueue::LocalQueue() {}
LocalQueue::~LocalQueue() {}
Message LocalQueue::pop() { return get(); }
@@ -48,7 +50,9 @@ bool LocalQueue::get(Message& result, sys::Duration timeout) {
if (!ok) return false;
if (content->isA<MessageTransferBody>()) {
result = Message(*content);
- autoAck.ack(result, session);
+ boost::intrusive_ptr<SubscriptionImpl> si = HandlePrivate<SubscriptionImpl>::get(subscription);
+ assert(si);
+ if (si) si->received(result);
return true;
}
else
@@ -56,9 +60,6 @@ bool LocalQueue::get(Message& result, sys::Duration timeout) {
QPID_MSG("Unexpected method: " << content->getMethod()));
}
-void LocalQueue::setAckPolicy(AckPolicy a) { autoAck=a; }
-AckPolicy& LocalQueue::getAckPolicy() { return autoAck; }
-
bool LocalQueue::empty() const
{
if (!queue)