summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/ConnectionHandler.cpp
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2011-06-06 13:02:16 +0000
committerKim van der Riet <kpvdr@apache.org>2011-06-06 13:02:16 +0000
commit273ebc2468eddbebff2503129e3e604c0b254486 (patch)
treea02805959c14e79aa2b8f6c490c840e3028ff8a7 /cpp/src/qpid/broker/ConnectionHandler.cpp
parent7fcba73793b1f9b67a604f6e4c75fc25d3a55eff (diff)
downloadqpid-python-273ebc2468eddbebff2503129e3e604c0b254486.tar.gz
QPID-3288: "[C++] Broker sets federation link tag as empty string () when no tag is present in the client/server properties"
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1132623 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/ConnectionHandler.cpp')
-rw-r--r--cpp/src/qpid/broker/ConnectionHandler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/ConnectionHandler.cpp b/cpp/src/qpid/broker/ConnectionHandler.cpp
index 3f97e5b9de..915a64b025 100644
--- a/cpp/src/qpid/broker/ConnectionHandler.cpp
+++ b/cpp/src/qpid/broker/ConnectionHandler.cpp
@@ -137,7 +137,9 @@ void ConnectionHandler::Handler::startOk(const framing::FieldTable& clientProper
throw;
}
connection.setFederationLink(clientProperties.get(QPID_FED_LINK));
- connection.setFederationPeerTag(clientProperties.getAsString(QPID_FED_TAG));
+ if (clientProperties.isSet(QPID_FED_TAG)) {
+ connection.setFederationPeerTag(clientProperties.getAsString(QPID_FED_TAG));
+ }
if (connection.isFederationLink()) {
if (acl && !acl->authorise(connection.getUserId(),acl::ACT_CREATE,acl::OBJ_LINK,"")){
proxy.close(framing::connection::CLOSE_CODE_CONNECTION_FORCED,"ACL denied creating a federation link");
@@ -292,7 +294,9 @@ void ConnectionHandler::Handler::start(const FieldTable& serverProperties,
}
}
- connection.setFederationPeerTag(serverProperties.getAsString(QPID_FED_TAG));
+ if (serverProperties.isSet(QPID_FED_TAG)) {
+ connection.setFederationPeerTag(serverProperties.getAsString(QPID_FED_TAG));
+ }
FieldTable ft;
ft.setInt(QPID_FED_LINK,1);