From 408006d6d6543309b29d17eadb6df16fdd57fdf2 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 26 Jun 2013 16:12:21 +0000 Subject: QPID-4953: recognise temp queue shorthand in 0-10 codepath git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1496985 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/amqp0_10/AddressResolution.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/client') diff --git a/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp b/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp index ac3253c572..dac2a4a6d9 100644 --- a/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp +++ b/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp @@ -24,6 +24,7 @@ #include "qpid/client/amqp0_10/MessageSink.h" #include "qpid/client/amqp0_10/OutgoingMessage.h" #include "qpid/messaging/Address.h" +#include "qpid/messaging/AddressImpl.h" #include "qpid/messaging/Message.h" #include "qpid/types/Variant.h" #include "qpid/messaging/exceptions.h" @@ -193,8 +194,8 @@ class Queue : protected Node void checkDelete(qpid::client::AsyncSession&, CheckMode); private: const bool durable; - const bool autoDelete; - const bool exclusive; + bool autoDelete; + bool exclusive; const std::string alternateExchange; FieldTable arguments; }; @@ -709,6 +710,11 @@ Queue::Queue(const Address& a) : Node(a), (Opt(a)/NODE/X_DECLARE/ARGUMENTS).collect(arguments); nodeBindings.setDefaultQueue(name); linkBindings.setDefaultQueue(name); + if (qpid::messaging::AddressImpl::isTemporary(a) && createPolicy.isVoid()) { + createPolicy = "always"; + autoDelete = true; + exclusive = true; + } } void Queue::checkCreate(qpid::client::AsyncSession& session, CheckMode mode) -- cgit v1.2.1