summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/management/ManagementBroker.cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-11-21 20:17:22 +0000
committerTed Ross <tross@apache.org>2008-11-21 20:17:22 +0000
commit7bc808c71f28e7a58aeedbd6dcc450f1265d660c (patch)
treecf61755e35a6bd9454ff68733b97a347e5c7bea5 /cpp/src/qpid/management/ManagementBroker.cpp
parent57c7e6d45483b94d4306eb93f285f4cbaa52bd57 (diff)
downloadqpid-python-7bc808c71f28e7a58aeedbd6dcc450f1265d660c.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/qpid@719699 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/management/ManagementBroker.cpp')
-rw-r--r--cpp/src/qpid/management/ManagementBroker.cpp25
1 files changed, 11 insertions, 14 deletions
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<pair<ObjectId, ManagementObject*> > 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,