summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp11
-rw-r--r--qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp b/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp
index 4cfe988b72..b7bd8bc50d 100644
--- a/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp
+++ b/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp
@@ -317,6 +317,17 @@ void Connection::setUserId(const string& uid)
isDefaultRealm = (
at!= std::string::npos &&
getBroker().getOptions().realm == userId.substr(at+1,userId.size()));
+ raiseConnectEvent();
+}
+
+void Connection::raiseConnectEvent() {
+ if (mgmtObject != 0) {
+ mgmtObject->set_authIdentity(userId);
+ agent->raiseEvent(_qmf::EventClientConnect(mgmtId, userId, mgmtObject->get_remoteProperties()));
+ }
+
+ QPID_LOG_CAT(debug, model, "Create connection. user:" << userId
+ << " rhost:" << mgmtId );
}
void Connection::setUserProxyAuth(bool b)
diff --git a/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h b/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h
index 5411b883ef..39a24adc1b 100644
--- a/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h
+++ b/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h
@@ -220,6 +220,8 @@ class Connection : public sys::ConnectionInputHandler, public qpid::broker::Conn
uint64_t objectId;
types::Variant::Map clientProperties;
+ void raiseConnectEvent();
+
friend class OutboundFrameTracker;
void sent(const framing::AMQFrame& f);