From 7bc808c71f28e7a58aeedbd6dcc450f1265d660c Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Fri, 21 Nov 2008 20:17:22 +0000 Subject: 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/qpid@719699 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/management/ManagementBroker.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'cpp/src/qpid/management/ManagementBroker.cpp') diff --git a/cpp/src/qpid/management/ManagementBroker.cpp b/cpp/src/qpid/management/ManagementBroker.cpp index 48b73546b3..b800d62fb6 100644 --- a/cpp/src/qpid/management/ManagementBroker.cpp +++ b/cpp/src/qpid/management/ManagementBroker.cpp @@ -344,17 +344,6 @@ void ManagementBroker::periodicProcessing (void) string routingKey; list > deleteList; - { - Buffer msgBuffer(msgChars, BUFSIZE); - encodeHeader(msgBuffer, 'h'); - msgBuffer.putLongLong(uint64_t(Duration(now()))); - - contentSize = BUFSIZE - msgBuffer.available (); - msgBuffer.reset (); - routingKey = "console.heartbeat.1.0"; - sendBuffer (msgBuffer, contentSize, mExchange, routingKey); - } - moveNewObjectsLH(); if (clientWasAdded) { @@ -367,9 +356,6 @@ void ManagementBroker::periodicProcessing (void) } } - if (managementObjects.empty ()) - return; - for (ManagementObjectMap::iterator iter = managementObjects.begin (); iter != managementObjects.end (); iter++) @@ -416,6 +402,17 @@ void ManagementBroker::periodicProcessing (void) deleteList.clear(); deleteOrphanedAgentsLH(); } + + { + Buffer msgBuffer(msgChars, BUFSIZE); + encodeHeader(msgBuffer, 'h'); + msgBuffer.putLongLong(uint64_t(Duration(now()))); + + contentSize = BUFSIZE - msgBuffer.available (); + msgBuffer.reset (); + routingKey = "console.heartbeat.1.0"; + sendBuffer (msgBuffer, contentSize, mExchange, routingKey); + } } void ManagementBroker::sendCommandComplete (string replyToKey, uint32_t sequence, -- cgit v1.2.1