summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2015-02-18 23:19:12 +0000
committerGordon Sim <gsim@apache.org>2015-02-18 23:19:12 +0000
commit8cdd7244b139358129c2b0c70516460034c1692a (patch)
tree6e6a12f476b4bc9654a5e4743d4689338e0fd623
parentb5072da9df419c16b63508d599006c9e2fc1ffd3 (diff)
downloadqpid-python-8cdd7244b139358129c2b0c70516460034c1692a.tar.gz
QPID-6389: ensure source/target is null when responding to attach requests in which they are also null
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1660763 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/broker/amqp/Session.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/broker/amqp/Session.cpp b/qpid/cpp/src/qpid/broker/amqp/Session.cpp
index 538883f29a..0e44374d19 100644
--- a/qpid/cpp/src/qpid/broker/amqp/Session.cpp
+++ b/qpid/cpp/src/qpid/broker/amqp/Session.cpp
@@ -383,6 +383,7 @@ void Session::attach(pn_link_t* link)
//i.e a subscription
std::string name;
if (pn_terminus_get_type(source) == PN_UNSPECIFIED) {
+ pn_terminus_set_type(pn_link_source(link), PN_UNSPECIFIED);
throw Exception(qpid::amqp::error_conditions::PRECONDITION_FAILED, "No source specified!");
} else if (pn_terminus_is_dynamic(source)) {
name = generateName(link);
@@ -399,6 +400,7 @@ void Session::attach(pn_link_t* link)
pn_terminus_t* target = pn_link_remote_target(link);
std::string name;
if (pn_terminus_get_type(target) == PN_UNSPECIFIED) {
+ pn_terminus_set_type(pn_link_target(link), PN_UNSPECIFIED);
throw Exception(qpid::amqp::error_conditions::PRECONDITION_FAILED, "No target specified!");
} else if (pn_terminus_get_type(target) == PN_COORDINATOR) {
QPID_LOG(debug, "Received attach request for incoming link to transaction coordinator on " << this);