diff options
| -rw-r--r-- | qpid/cpp/src/qpid/broker/SessionState.cpp | 8 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp | 7 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/broker/management-schema.xml | 1 | ||||
| -rw-r--r-- | qpid/python/qpid/disp.py | 4 | ||||
| -rw-r--r-- | qpid/tools/src/py/qpidtoollibs/disp.py | 4 |
5 files changed, 17 insertions, 7 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"/> diff --git a/qpid/python/qpid/disp.py b/qpid/python/qpid/disp.py index c29ea009de..d1340b8a05 100644 --- a/qpid/python/qpid/disp.py +++ b/qpid/python/qpid/disp.py @@ -151,8 +151,8 @@ class Display: print line line = self.tablePrefix for width in colWidth: - for i in range (width): - line = line + "=" + line = line + "=" * width + line = line[:255] print line for row in rows: diff --git a/qpid/tools/src/py/qpidtoollibs/disp.py b/qpid/tools/src/py/qpidtoollibs/disp.py index 21e09f8d00..1b7419ba2c 100644 --- a/qpid/tools/src/py/qpidtoollibs/disp.py +++ b/qpid/tools/src/py/qpidtoollibs/disp.py @@ -182,8 +182,8 @@ class Display: print line line = self.tablePrefix for width in colWidth: - for i in range (width): - line = line + "=" + line = line + "=" * width + line = line[:255] print line for row in rows: |
