summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionAdapter.cpp
diff options
context:
space:
mode:
authorJonathan Robie <jonathan@apache.org>2010-10-04 18:51:13 +0000
committerJonathan Robie <jonathan@apache.org>2010-10-04 18:51:13 +0000
commit03b1fdb3ca817c919b81caca35d5a936b185d77a (patch)
tree60d4ad45a4de8382f5620b5685d42e625ac40e72 /cpp/src/qpid/broker/SessionAdapter.cpp
parentc542729c5030728e310660b6fa22972de7a7b62c (diff)
downloadqpid-python-03b1fdb3ca817c919b81caca35d5a936b185d77a.tar.gz
Allows browsing of exclusive queues held by another session.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1004357 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionAdapter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp
index 2effa03afb..d4f6b28ccb 100644
--- a/cpp/src/qpid/broker/SessionAdapter.cpp
+++ b/cpp/src/qpid/broker/SessionAdapter.cpp
@@ -489,7 +489,8 @@ SessionAdapter::MessageHandlerImpl::subscribe(const string& queueName,
Queue::shared_ptr queue = getQueue(queueName);
if(!destination.empty() && state.exists(destination))
throw NotAllowedException(QPID_MSG("Consumer tags must be unique"));
- if (queue->hasExclusiveOwner() && !queue->isExclusiveOwner(&session))
+
+ if (queue->hasExclusiveOwner() && !queue->isExclusiveOwner(&session) && acquireMode == 0)
throw ResourceLockedException(QPID_MSG("Cannot subscribe to exclusive queue "
<< queue->getName()));