qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1414707 - in /qpid/branches/0.20/qpid/cpp/src/qpid/messaging/amqp: SenderContext.cpp SenderContext.h
Date Wed, 28 Nov 2012 14:13:29 GMT
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


Mime
View raw message