From 5c1efa08b20d4bca2e8e5b81c7f1e78cdcc87c8a Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 4 Nov 2013 20:38:10 +0000 Subject: QPID-5292: restore raising of connection event and setting of authIdentity on mgmt object git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1538754 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp | 11 +++++++++++ qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h | 2 ++ 2 files changed, 13 insertions(+) (limited to 'qpid/cpp/src') 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); -- cgit v1.2.1