summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2015-01-19 14:13:11 +0000
committerGordon Sim <gsim@apache.org>2015-01-19 14:13:11 +0000
commit9ff0e238e286632fe0996779abbf70b72dada252 (patch)
tree85ea4aee4cda2613dfc3cb0dcbab3ffa42866362 /qpid/cpp/src
parentcd68c04d70cd93d01feec3ae5e034f497f88823d (diff)
downloadqpid-python-9ff0e238e286632fe0996779abbf70b72dada252.tar.gz
QPID-5597: honour explicit auto-delete when True (as well as when False)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1653008 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp b/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
index 6128f4c0fc..2d03748ac6 100644
--- a/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
+++ b/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
@@ -534,7 +534,7 @@ Subscription::Subscription(const Address& address, const std::string& type)
reliable(durable ? !AddressResolution::is_unreliable(address) : AddressResolution::is_reliable(address)),
actualType(type.empty() ? (specifiedType.empty() ? TOPIC_EXCHANGE : specifiedType) : type),
exclusiveQueue((Opt(address)/LINK/X_DECLARE/EXCLUSIVE).asBool(true)),
- autoDeleteQueue((Opt(address)/LINK/X_DECLARE/AUTO_DELETE).asBool(true)),
+ autoDeleteQueue((Opt(address)/LINK/X_DECLARE/AUTO_DELETE).asBool(!(durable || reliable))),
exclusiveSubscription((Opt(address)/LINK/X_SUBSCRIBE/EXCLUSIVE).asBool(exclusiveQueue)),
alternateExchange((Opt(address)/LINK/X_DECLARE/ALTERNATE_EXCHANGE).str())
{
@@ -610,7 +610,7 @@ void Subscription::subscribe(qpid::client::AsyncSession& session, const std::str
//create subscription queue:
session.queueDeclare(arg::queue=queue, arg::exclusive=exclusiveQueue,
- arg::autoDelete=autoDeleteQueue && (!(durable || reliable)), arg::durable=durable,
+ arg::autoDelete=autoDeleteQueue, arg::durable=durable,
arg::alternateExchange=alternateExchange,
arg::arguments=queueOptions);
//'default' binding: