summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-11-12 18:19:08 +0000
committerGordon Sim <gsim@apache.org>2010-11-12 18:19:08 +0000
commitbbd94f116d039b6a848a0e4ce2cf8653deefe089 (patch)
treeda6b99cc2044de5dcbbb563817dc57fc7c27b658
parent10a0a7c30343c15e51128bc3a11890298608ddbf (diff)
downloadqpid-python-bbd94f116d039b6a848a0e4ce2cf8653deefe089.tar.gz
QPID-2940: always request completions from broker on Session::acknowledge(), and always clean up any pending accept records at that time
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.8-release-candidates@1034499 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp4
-rw-r--r--qpid/cpp/src/qpid/messaging/Session.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp b/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
index 1086146b0d..6d98527627 100644
--- a/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
+++ b/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
@@ -97,7 +97,7 @@ void SessionImpl::acknowledge(bool sync_)
//message may be redelivered; i.e. the application cannot delete
//any state necessary for preventing reprocessing of the message
execute<Acknowledge>();
- if (sync_) sync(true);
+ sync(sync_);
}
void SessionImpl::reject(qpid::messaging::Message& m)
@@ -433,6 +433,8 @@ void SessionImpl::syncImpl(bool block)
{
if (block) session.sync();
else session.flush();
+ //cleanup unconfirmed accept records:
+ incoming.pendingAccept();
}
void SessionImpl::commitImpl()
diff --git a/qpid/cpp/src/qpid/messaging/Session.cpp b/qpid/cpp/src/qpid/messaging/Session.cpp
index f07fad434e..496953a8e5 100644
--- a/qpid/cpp/src/qpid/messaging/Session.cpp
+++ b/qpid/cpp/src/qpid/messaging/Session.cpp
@@ -39,7 +39,7 @@ Session& Session::operator=(const Session& s) { return PI::assign(*this, s); }
void Session::commit() { impl->commit(); }
void Session::rollback() { impl->rollback(); }
void Session::acknowledge(bool sync) { impl->acknowledge(sync); }
-void Session::acknowledge(Message& m, bool s) { impl->acknowledge(m); if (s) sync(true); }
+void Session::acknowledge(Message& m, bool s) { impl->acknowledge(m); sync(s); }
void Session::reject(Message& m) { impl->reject(m); }
void Session::release(Message& m) { impl->release(m); }
void Session::close() { impl->close(); }