From 225d6e4dccdac1203ae5b8ab473f9afa75565b21 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 1 Mar 2011 11:14:10 +0000 Subject: QPID-2630: ensure that exclusive, auto-deleted queues are freed up on early deletion (remove some confusion between connection and session scope for these) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1075777 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/SessionAdapter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp') diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp index 68aa26b270..63c4b660b2 100644 --- a/cpp/src/qpid/broker/SessionAdapter.cpp +++ b/cpp/src/qpid/broker/SessionAdapter.cpp @@ -353,12 +353,12 @@ void SessionAdapter::QueueHandlerImpl::checkDelete(Queue::shared_ptr queue, bool } else if(ifUnused && queue->getConsumerCount() > 0) { throw PreconditionFailedException(QPID_MSG("Cannot delete queue " << queue->getName() << "; queue in use")); - } else if (queue->isExclusiveOwner(&getConnection())) { + } else if (queue->isExclusiveOwner(&session)) { //remove the queue from the list of exclusive queues if necessary - QueueVector::iterator i = std::find(getConnection().exclusiveQueues.begin(), - getConnection().exclusiveQueues.end(), + QueueVector::iterator i = std::find(exclusiveQueues.begin(), + exclusiveQueues.end(), queue); - if (i < getConnection().exclusiveQueues.end()) getConnection().exclusiveQueues.erase(i); + if (i < exclusiveQueues.end()) exclusiveQueues.erase(i); } } -- cgit v1.2.1