From 83cd0d00a444d1e1b5f8e15135bf377eba03388d Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Fri, 10 Aug 2012 17:19:51 +0000 Subject: QPID-4142 C++ Broker connection counting gets usernames confused when various auth mechanism are used. The issue is that the connection's userId is changed as the auth progresses. Also, the shadowed connections change differently from the non-shadowed connections. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1371772 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Connection.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cpp/src/qpid/broker/Connection.cpp') diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp index 8d250a32e5..e68c906cc2 100644 --- a/cpp/src/qpid/broker/Connection.cpp +++ b/cpp/src/qpid/broker/Connection.cpp @@ -25,6 +25,7 @@ #include "qpid/broker/Bridge.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Queue.h" +#include "qpid/broker/AclModule.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/sys/ClusterSafe.h" @@ -278,6 +279,13 @@ void Connection::notifyConnectionForced(const string& text) void Connection::setUserId(const string& userId) { + // Account for changing userId + AclModule* acl = broker.getAcl(); + if (acl) + { + acl->setUserId(*this, userId); + } + ConnectionState::setUserId(userId); // In a cluster, the cluster code will raise the connect event // when the connection is replicated to the cluster. -- cgit v1.2.1