summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/broker/SessionState.cpp8
-rw-r--r--qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp7
-rw-r--r--qpid/cpp/src/qpid/broker/management-schema.xml1
3 files changed, 13 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/broker/SessionState.cpp b/qpid/cpp/src/qpid/broker/SessionState.cpp
index 8b57bd9e71..6dfc34a379 100644
--- a/qpid/cpp/src/qpid/broker/SessionState.cpp
+++ b/qpid/cpp/src/qpid/broker/SessionState.cpp
@@ -69,8 +69,12 @@ void SessionState::addManagementObject() {
if (parent != 0) {
ManagementAgent* agent = getBroker().getManagementAgent();
if (agent != 0) {
- mgmtObject = _qmf::Session::shared_ptr(new _qmf::Session
- (agent, this, parent, getId().getName()));
+ std::string name(getId().getName());
+ std::string fullName(name);
+ if (name.length() >= std::numeric_limits<uint8_t>::max())
+ name.resize(std::numeric_limits<uint8_t>::max()-1);
+ mgmtObject = _qmf::Session::shared_ptr(new _qmf::Session (agent, this, parent, name));
+ mgmtObject->set_fullName (fullName);
mgmtObject->set_attached (0);
mgmtObject->set_detachedLifespan (0);
mgmtObject->clr_expireTime();
diff --git a/qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp b/qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp
index 5917ddb28a..fcccfaea8f 100644
--- a/qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp
+++ b/qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp
@@ -36,7 +36,12 @@ ManagedSession::ManagedSession(Broker& broker, ManagedConnection& p, const std::
{
qpid::management::ManagementAgent* agent = broker.getManagementAgent();
if (agent != 0) {
- session = _qmf::Session::shared_ptr(new _qmf::Session(agent, this, broker.GetVhostObject(), id));
+ std::string name(id);
+ std::string fullName(name);
+ if (name.length() >= std::numeric_limits<uint8_t>::max())
+ name.resize(std::numeric_limits<uint8_t>::max()-1);
+ session = _qmf::Session::shared_ptr(new _qmf::Session(agent, this, broker.GetVhostObject(), name));
+ session->set_fullName(fullName);
session->set_attached(true);
session->set_detachedLifespan(0);
session->clr_expireTime();
diff --git a/qpid/cpp/src/qpid/broker/management-schema.xml b/qpid/cpp/src/qpid/broker/management-schema.xml
index d0c901684a..e2690c8f30 100644
--- a/qpid/cpp/src/qpid/broker/management-schema.xml
+++ b/qpid/cpp/src/qpid/broker/management-schema.xml
@@ -530,6 +530,7 @@
<class name="Session">
<property name="vhostRef" type="objId" references="Vhost" access="RC" index="y" parentRef="y"/>
<property name="name" type="sstr" access="RC" index="y"/>
+ <property name="fullName" type="lstr" access="RO" optional="y"/>
<property name="channelId" type="uint16" access="RO"/>
<property name="connectionRef" type="objId" references="Connection" access="RO"/>
<property name="detachedLifespan" type="uint32" access="RO" unit="second"/>