From ec8dc9456df747f6418b9d3f41b52667c08036bb Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 26 Mar 2013 18:09:27 +0000 Subject: QPID-4667: Fix for selective message acknowledgement over AMQP 1.0 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1461248 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/messaging/amqp/SessionContext.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cpp') diff --git a/cpp/src/qpid/messaging/amqp/SessionContext.cpp b/cpp/src/qpid/messaging/amqp/SessionContext.cpp index 9bdc658bc7..bca40c6058 100644 --- a/cpp/src/qpid/messaging/amqp/SessionContext.cpp +++ b/cpp/src/qpid/messaging/amqp/SessionContext.cpp @@ -138,9 +138,13 @@ void SessionContext::acknowledge() void SessionContext::acknowledge(const qpid::framing::SequenceNumber& id, bool cumulative) { + QPID_LOG(debug, "acknowledging selected messages, id=" << id << ", cumulative=" << cumulative); DeliveryMap::iterator i = unacked.find(id); if (i != unacked.end()) { - acknowledge(cumulative ? unacked.begin() : i, ++i); + DeliveryMap::iterator start = cumulative ? unacked.begin() : i; + acknowledge(start, ++i); + } else { + QPID_LOG(debug, "selective acknowledgement failed; message not found for id " << id); } } -- cgit v1.2.1