summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2013-03-26 18:09:27 +0000
committerGordon Sim <gsim@apache.org>2013-03-26 18:09:27 +0000
commitec8dc9456df747f6418b9d3f41b52667c08036bb (patch)
treed28941ff4e6585a89c331240ceb5eda600a6119c
parent655a934195cbed7e4e3501c69724132f0daa0f3e (diff)
downloadqpid-python-ec8dc9456df747f6418b9d3f41b52667c08036bb.tar.gz
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
-rw-r--r--cpp/src/qpid/messaging/amqp/SessionContext.cpp6
1 files changed, 5 insertions, 1 deletions
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);
}
}