qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1740422 - /qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h
Date Thu, 21 Apr 2016 22:25:35 GMT
Author: gsim
Date: Thu Apr 21 22:25:35 2016
New Revision: 1740422

URL: http://svn.apache.org/viewvc?rev=1740422&view=rev
Log:
QPID-7225: ensure message to be released is acquired

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h?rev=1740422&r1=1740421&r2=1740422&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h Thu Apr 21 22:25:35 2016
@@ -112,7 +112,7 @@ template <typename T> class IndexedDeque
     T* release(const QueueCursor& cursor)
     {
         size_t i;
-        if (cursor.valid && index(cursor.position, i)) {
+        if (cursor.valid && index(cursor.position, i) && messages[i].getState()
== ACQUIRED) {
             messages[i].setState(AVAILABLE);
             ++version;
             QPID_LOG(debug, "Released message at position " << cursor.position <<
", index " << i);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message