From b91f65649ad0dc30ec5b892c64fa6c8fafc6a9ea 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@1461248 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/messaging/amqp/SessionContext.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/messaging/amqp/SessionContext.cpp b/qpid/cpp/src/qpid/messaging/amqp/SessionContext.cpp index 9bdc658bc7..bca40c6058 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/SessionContext.cpp +++ b/qpid/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