diff options
| author | Gordon Sim <gsim@apache.org> | 2013-06-26 16:12:21 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-06-26 16:12:21 +0000 |
| commit | 408006d6d6543309b29d17eadb6df16fdd57fdf2 (patch) | |
| tree | b95b889e317e1eebab1e92e9dd8d10285bf527b1 /cpp/src/qpid | |
| parent | 22115cc570ebdc27671adbdeb63db4adc47a3c8e (diff) | |
| download | qpid-python-408006d6d6543309b29d17eadb6df16fdd57fdf2.tar.gz | |
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
Diffstat (limited to 'cpp/src/qpid')
| -rw-r--r-- | cpp/src/qpid/client/amqp0_10/AddressResolution.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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) |
