diff options
| author | Carl C. Trieloff <cctrieloff@apache.org> | 2010-01-06 21:48:42 +0000 |
|---|---|---|
| committer | Carl C. Trieloff <cctrieloff@apache.org> | 2010-01-06 21:48:42 +0000 |
| commit | dd4acef7f90f2351aa8ceace566521b807505614 (patch) | |
| tree | 595d86cfc7c5d4d93df1579786f71ee82132bd90 /cpp/src/qpid | |
| parent | 88e367b1781a63d9047460a719472b017c77fa49 (diff) | |
| download | qpid-python-dd4acef7f90f2351aa8ceace566521b807505614.tar.gz | |
fix & test QPID-2320
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@896687 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
| -rw-r--r-- | cpp/src/qpid/broker/Queue.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index f4231f2397..068ebe3103 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/cpp/src/qpid/broker/Queue.cpp @@ -263,9 +263,10 @@ bool Queue::acquire(const QueuedMessage& msg) { Mutex::ScopedLock locker(messageLock); QPID_LOG(debug, "attempting to acquire " << msg.position); Messages::iterator i = findAt(msg.position); - if ((i != messages.end() && !lastValueQueue) // note that in some cases payload not be set - || (lastValueQueue && (i->position == msg.position) && - msg.payload.get() == checkLvqReplace(*i).payload.get()) ) { + if ((i != messages.end() && i->position == msg.position) && // note that in some cases payload not be set + (!lastValueQueue || + (lastValueQueue && msg.payload.get() == checkLvqReplace(*i).payload.get()) ) // note this is safe for no payload set 0==0 + ) { clearLVQIndex(msg); QPID_LOG(debug, @@ -273,9 +274,7 @@ bool Queue::acquire(const QueuedMessage& msg) { i->position << " == " << msg.position); messages.erase(i); return true; - } else { - QPID_LOG(debug, "No match: " << i->position << " != " << msg.position); - } + } QPID_LOG(debug, "Acquire failed for " << msg.position); return false; |
