summaryrefslogtreecommitdiff
path: root/qpid/cpp
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
commitb91f65649ad0dc30ec5b892c64fa6c8fafc6a9ea (patch)
tree9eb3e210e423fbfa59cb222dc664a0c0b73b5342 /qpid/cpp
parent4eb22cf27395d8baeb8777c298d4d5897c5596ba (diff)
downloadqpid-python-b91f65649ad0dc30ec5b892c64fa6c8fafc6a9ea.tar.gz
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
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/messaging/amqp/SessionContext.cpp6
1 files changed, 5 insertions, 1 deletions
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);
}
}