qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1155381 - /qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
Date Tue, 09 Aug 2011 14:18:53 GMT
Author: gsim
Date: Tue Aug  9 14:18:52 2011
New Revision: 1155381

URL: http://svn.apache.org/viewvc?rev=1155381&view=rev
Log:
QPID-3400: remove redundant delivery records on release

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp?rev=1155381&r1=1155380&r2=1155381&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp Tue Aug  9 14:18:52 2011
@@ -693,6 +693,10 @@ void SemanticState::release(DeliveryId f
     DeliveryRecords::reverse_iterator start(range.end);
     DeliveryRecords::reverse_iterator end(range.start);
     for_each(start, end, boost::bind(&DeliveryRecord::release, _1, setRedelivered));
+
+    DeliveryRecords::iterator removed =
+        remove_if(range.start, range.end, bind(&DeliveryRecord::isRedundant, _1));
+    unacked.erase(removed, range.end);
 }
 
 void SemanticState::reject(DeliveryId first, DeliveryId last)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message