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 2016/04/22 00:25:35 UTC

svn commit: r1740422 - /qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h

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