summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/ConnectionHandler.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-05-27 20:02:18 +0000
committerAlan Conway <aconway@apache.org>2010-05-27 20:02:18 +0000
commit0b717b95d472d96f32395df14a5a6433fdbbae1c (patch)
tree9542d849859ffe54b4317a2bec21c109f59636a7 /cpp/src/qpid/broker/ConnectionHandler.cpp
parentc95b2615abf0883f7d92aad73138a4dda14e1311 (diff)
downloadqpid-python-0b717b95d472d96f32395df14a5a6433fdbbae1c.tar.gz
Fix issues with cluster+security
- was using "none" not empty string for no ID. - was multicasting secure id for update and shadow connections. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@948967 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/ConnectionHandler.cpp')
-rw-r--r--cpp/src/qpid/broker/ConnectionHandler.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/cpp/src/qpid/broker/ConnectionHandler.cpp b/cpp/src/qpid/broker/ConnectionHandler.cpp
index b2d4210473..bf1af2fe88 100644
--- a/cpp/src/qpid/broker/ConnectionHandler.cpp
+++ b/cpp/src/qpid/broker/ConnectionHandler.cpp
@@ -181,14 +181,6 @@ void ConnectionHandler::Handler::tuneOk(uint16_t /*channelmax*/,
connection.setHeartbeatInterval(heartbeat);
}
-void ConnectionHandler::Handler::callUserIdCallbacks ( ) {
- string s;
- if ( false == authenticator->getUsername(s) )
- s = "none";
- if ( userIdCallback )
- userIdCallback ( s );
-}
-
void ConnectionHandler::Handler::open(const string& /*virtualHost*/,
const framing::Array& /*capabilities*/, bool /*insist*/)
{
@@ -204,7 +196,14 @@ void ConnectionHandler::Handler::open(const string& /*virtualHost*/,
if (sl.get()) secured->activateSecurityLayer(sl);
}
- callUserIdCallbacks ( );
+ if ( userIdCallback ) {
+ string s;
+ // Not checking the return value of getUsername, if there is
+ // no username then we want to call the userIdCallback anyway
+ // with an empty string.
+ authenticator->getUsername(s);
+ userIdCallback(s);
+ }
}