diff options
| author | Gordon Sim <gsim@apache.org> | 2013-08-20 12:17:06 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-08-20 12:17:06 +0000 |
| commit | ab2fe270cfc4643ef7bbedd964f343f3c5d88f29 (patch) | |
| tree | 7e1fc77774fa114df55f5171a411f45b74124b5b /cpp/src/qpid | |
| parent | 03671d52b62ec4d36fb5734cc21aeba5b9a0a691 (diff) | |
| download | qpid-python-ab2fe270cfc4643ef7bbedd964f343f3c5d88f29.tar.gz | |
QPID-5085: ensure messages released 'behind' a cursor on a priority queue don't get missed
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1515793 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
| -rw-r--r-- | cpp/src/qpid/broker/PriorityQueue.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/PriorityQueue.cpp b/cpp/src/qpid/broker/PriorityQueue.cpp index 99488ded13..5e60fe5cce 100644 --- a/cpp/src/qpid/broker/PriorityQueue.cpp +++ b/cpp/src/qpid/broker/PriorityQueue.cpp @@ -135,7 +135,12 @@ void PriorityQueue::publish(const Message& published) Message* PriorityQueue::release(const QueueCursor& cursor) { MessagePointer* ptr = fifo.release(cursor); - return ptr ? &(ptr->holder->message) : 0; + if (ptr) { + messages[ptr->holder->priority].resetCursors(); + return &(ptr->holder->message); + } else { + return 0; + } } void PriorityQueue::foreach(Functor f) |
