From b8606dba4f8edc95bf5af7ace7090ca5f9f796b7 Mon Sep 17 00:00:00 2001 From: Kenneth Anthony Giusti Date: Tue, 6 Apr 2010 15:24:33 +0000 Subject: verify broker UUID read from config file git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931182 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/management/ManagementAgent.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/management/ManagementAgent.cpp b/cpp/src/qpid/management/ManagementAgent.cpp index bc62588f5d..4158b685ce 100644 --- a/cpp/src/qpid/management/ManagementAgent.cpp +++ b/cpp/src/qpid/management/ManagementAgent.cpp @@ -150,7 +150,11 @@ void ManagementAgent::configure(const string& _dataDir, uint16_t _interval, inFile >> bootSequence; inFile >> nextRemoteBank; inFile.close(); - QPID_LOG (debug, "ManagementAgent restored broker ID: " << uuid); + if (uuid.isNull()) { + uuid.generate(); + QPID_LOG (info, "No stored broker ID found - ManagementAgent generated broker ID: " << uuid); + } else + QPID_LOG (debug, "ManagementAgent restored broker ID: " << uuid); // if sequence goes beyond a 12-bit field, skip zero and wrap to 1. bootSequence++; -- cgit v1.2.1