From c1370cebea3c565bb87bd8119b902703680a71a7 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 21 Apr 2016 22:25:35 +0000 Subject: QPID-7225: ensure message to be released is acquired git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1740422 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/IndexedDeque.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/broker/IndexedDeque.h b/qpid/cpp/src/qpid/broker/IndexedDeque.h index 229b4e3009..e13a218ad0 100644 --- a/qpid/cpp/src/qpid/broker/IndexedDeque.h +++ b/qpid/cpp/src/qpid/broker/IndexedDeque.h @@ -112,7 +112,7 @@ template 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); -- cgit v1.2.1