From 5c952db3bb1fad90ea4f5de985453d13dce45e7c Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 7 Nov 2007 21:01:26 +0000 Subject: auto-ack support for perftest. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592897 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/LocalQueue.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/client/LocalQueue.cpp') diff --git a/cpp/src/qpid/client/LocalQueue.cpp b/cpp/src/qpid/client/LocalQueue.cpp index 09bf1e055a..7fbe4a053e 100644 --- a/cpp/src/qpid/client/LocalQueue.cpp +++ b/cpp/src/qpid/client/LocalQueue.cpp @@ -35,8 +35,11 @@ Message LocalQueue::pop() { if (!queue) throw ClosedException(); FrameSet::shared_ptr content = queue->pop(); - if (content->isA()) - return Message(*content, session); + if (content->isA()) { + Message m(*content, session); + autoAck.ack(m); + return m; + } else throw CommandInvalidException( QPID_MSG("Unexpected method: " << content->getMethod())); -- cgit v1.2.1