diff options
author | Ted Ross <tross@apache.org> | 2008-11-21 20:17:22 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2008-11-21 20:17:22 +0000 |
commit | a00e575e242f6c5c9673948efc905226f5a0bfd2 (patch) | |
tree | 8fb608856ca15d5286541844a1dcd513bbd7030f /qpid/cpp/src/qpid/agent | |
parent | 284d5014e4881605ee63f774a42bb54f05ea9f22 (diff) | |
download | qpid-python-a00e575e242f6c5c9673948efc905226f5a0bfd2.tar.gz |
Fixed several problems related to qmf update timestamps:
- Timestamps were set at update send time regardless of whether
the object's contents were actually changed. Now timestamps are
set at the time of the change.
- Agent heartbeat messages are now being sent after periodic
updates, not before.
Cleaned up the Agent object in qmf.console.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@719699 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/agent')
-rw-r--r-- | qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp index dc9122664d..1f7d2569fb 100644 --- a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp +++ b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp @@ -687,18 +687,6 @@ void ManagementAgentImpl::periodicProcessing() if (!connected) return; - { - Buffer msgBuffer(msgChars, BUFSIZE); - encodeHeader(msgBuffer, 'h'); - msgBuffer.putLongLong(uint64_t(Duration(now()))); - stringstream key; - key << "console.heartbeat." << assignedBrokerBank << "." << assignedAgentBank; - - contentSize = BUFSIZE - msgBuffer.available(); - msgBuffer.reset(); - connThreadBody.sendBuffer(msgBuffer, contentSize, "qpid.management", key.str()); - } - moveNewObjectsLH(); if (debugLevel >= DEBUG_PUBLISH) { @@ -715,9 +703,6 @@ void ManagementAgentImpl::periodicProcessing() } } - if (managementObjects.empty()) - return; - // // Clear the been-here flag on all objects in the map. // @@ -792,6 +777,18 @@ void ManagementAgentImpl::periodicProcessing() } deleteList.clear(); + + { + Buffer msgBuffer(msgChars, BUFSIZE); + encodeHeader(msgBuffer, 'h'); + msgBuffer.putLongLong(uint64_t(Duration(now()))); + stringstream key; + key << "console.heartbeat." << assignedBrokerBank << "." << assignedAgentBank; + + contentSize = BUFSIZE - msgBuffer.available(); + msgBuffer.reset(); + connThreadBody.sendBuffer(msgBuffer, contentSize, "qpid.management", key.str()); + } } void ManagementAgentImpl::ConnectionThread::run() |