summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2013-11-11 11:52:49 +0000
committerGordon Sim <gsim@apache.org>2013-11-11 11:52:49 +0000
commit5a6c8f1b8718c31351adf7c527b9b871133cf679 (patch)
treea87727437d69dc44ace08f2e38219b2523b99248
parent6b6fec28658e5815601da8bf1119f08c4bdb7b15 (diff)
downloadqpid-python-5a6c8f1b8718c31351adf7c527b9b871133cf679.tar.gz
QPID-5328: not-acquired implies no accept needed
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1540676 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp b/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
index 872e1d59df..2effe4a115 100644
--- a/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
+++ b/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
@@ -227,8 +227,8 @@ class QueueSource : public Queue, public MessageSource
void subscribe(qpid::client::AsyncSession& session, const std::string& destination);
void cancel(qpid::client::AsyncSession& session, const std::string& destination);
private:
- const AcceptMode acceptMode;
const AcquireMode acquireMode;
+ const AcceptMode acceptMode;
bool exclusive;
FieldTable options;
};
@@ -472,13 +472,13 @@ bool isBrowse(const Address& address)
QueueSource::QueueSource(const Address& address) :
Queue(address),
- acceptMode(AddressResolution::is_unreliable(address) ? ACCEPT_MODE_NONE : ACCEPT_MODE_EXPLICIT),
acquireMode(isBrowse(address) ? ACQUIRE_MODE_NOT_ACQUIRED : ACQUIRE_MODE_PRE_ACQUIRED),
+ //since this client does not provide any means by which an
+ //unacquired message can be acquired, there is no value in an
+ //explicit accept
+ acceptMode(acquireMode == ACQUIRE_MODE_NOT_ACQUIRED || AddressResolution::is_unreliable(address) ? ACCEPT_MODE_NONE : ACCEPT_MODE_EXPLICIT),
exclusive(false)
{
- //extract subscription arguments from address options (nb: setting
- //of accept-mode/acquire-mode/destination controlled though other
- //options)
exclusive = Opt(address)/LINK/X_SUBSCRIBE/EXCLUSIVE;
(Opt(address)/LINK/X_SUBSCRIBE/ARGUMENTS).collect(options);
std::string selector = Opt(address)/LINK/SELECTOR;