You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2012/11/28 15:13:29 UTC
svn commit: r1414707 - in
/qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp: SenderContext.cpp
SenderContext.h
Author: gsim
Date: Wed Nov 28 14:13:28 2012
New Revision: 1414707
URL: http://svn.apache.org/viewvc?rev=1414707&view=rev
Log:
QPID-4459: settle sent messages once they have been accepted by peer
Modified:
qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/SenderContext.cpp
qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h
Modified: qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/SenderContext.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/SenderContext.cpp?rev=1414707&r1=1414706&r2=1414707&view=diff
==============================================================================
--- qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/SenderContext.cpp (original)
+++ qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/SenderContext.cpp Wed Nov 28 14:13:28 2012
@@ -95,6 +95,7 @@ uint32_t SenderContext::processUnsettled
{
//remove accepted messages from front of deque
while (!deliveries.empty() && deliveries.front().accepted()) {
+ deliveries.front().settle();
deliveries.pop_front();
}
return deliveries.size();
@@ -336,7 +337,10 @@ bool SenderContext::Delivery::accepted()
{
return pn_delivery_remote_state(token) == PN_ACCEPTED;
}
-
+void SenderContext::Delivery::settle()
+{
+ pn_delivery_settle(token);
+}
void SenderContext::configure() const
{
configure(pn_link_target(sender));
Modified: qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h
URL: http://svn.apache.org/viewvc/qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h?rev=1414707&r1=1414706&r2=1414707&view=diff
==============================================================================
--- qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h (original)
+++ qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp/SenderContext.h Wed Nov 28 14:13:28 2012
@@ -53,6 +53,7 @@ class SenderContext
void encode(const qpid::messaging::MessageImpl& message, const qpid::messaging::Address&);
void send(pn_link_t*);
bool accepted();
+ void settle();
private:
int32_t id;
pn_delivery_t* token;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org