diff options
author | Gordon Sim <gsim@apache.org> | 2007-10-11 13:29:37 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-10-11 13:29:37 +0000 |
commit | 685aad458c485cd260df694f58d2f7641ce94e32 (patch) | |
tree | 57b4963ac7105f711ced6e4627232e0f62fda3be /cpp/src/qpid/broker/BrokerAdapter.cpp | |
parent | a23f05ddb503e587473519fa3f6491a93798a535 (diff) | |
download | qpid-python-685aad458c485cd260df694f58d2f7641ce94e32.tar.gz |
Exclusive no longer implies auto-delete on queue.declare.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@583821 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/BrokerAdapter.cpp')
-rw-r--r-- | cpp/src/qpid/broker/BrokerAdapter.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/BrokerAdapter.cpp b/cpp/src/qpid/broker/BrokerAdapter.cpp index 0fb521d626..820cc2f397 100644 --- a/cpp/src/qpid/broker/BrokerAdapter.cpp +++ b/cpp/src/qpid/broker/BrokerAdapter.cpp @@ -180,7 +180,7 @@ void BrokerAdapter::QueueHandlerImpl::declare(uint16_t /*ticket*/, const string& std::pair<Queue::shared_ptr, bool> queue_created = getBroker().getQueues().declare( name, durable, - autoDelete && !exclusive, + autoDelete, exclusive ? &getConnection() : 0); queue = queue_created.first; assert(queue); @@ -202,7 +202,11 @@ void BrokerAdapter::QueueHandlerImpl::declare(uint16_t /*ticket*/, const string& if (exclusive) { getConnection().exclusiveQueues.push_back(queue); } - } + } else { + if (exclusive && !queue->hasExclusiveOwner()) { + queue->setExclusiveOwner(&getConnection()); + } + } } if (exclusive && !queue->isExclusiveOwner(&getConnection())) throw ResourceLockedException( |