summaryrefslogtreecommitdiff
path: root/qpid
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-01-29 15:14:59 +0000
committerAlan Conway <aconway@apache.org>2010-01-29 15:14:59 +0000
commitef5d60dfd1987121a3a96eba09e55f593f783004 (patch)
tree835ac94efc4d8d065486ecf00f1397c9888869bb /qpid
parent0b8808f172f37b72ab6df004fc9d64ba40ea2919 (diff)
downloadqpid-python-ef5d60dfd1987121a3a96eba09e55f593f783004.tar.gz
Fixed missing ManagementAgent test, causing core dumps in cluster with --mgmt-enable=no.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@904515 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid')
-rw-r--r--qpid/cpp/src/qpid/cluster/UpdateClient.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/qpid/cpp/src/qpid/cluster/UpdateClient.cpp b/qpid/cpp/src/qpid/cluster/UpdateClient.cpp
index 3fba194d44..6c8bb7e890 100644
--- a/qpid/cpp/src/qpid/cluster/UpdateClient.cpp
+++ b/qpid/cpp/src/qpid/cluster/UpdateClient.cpp
@@ -190,14 +190,15 @@ template <class T> std::string encode(const T& t) {
//
void UpdateClient::updateManagementSetupState(Broker & b)
{
- qmf::org::apache::qpid::broker::ManagementSetupState mss(b.getManagementAgent(), 0);
- mss.set_objectNum(b.getManagementAgent()->getNextObjectId());
- mss.set_bootSequence(b.getManagementAgent()->getBootSequence());
-
- QPID_LOG(debug, updaterId << " updating management-setup-state " << mss.get_objectNum()
- << " " << mss.get_bootSequence() << "\n");
-
- ClusterConnectionProxy(session).managementSetupState(mss.get_objectNum(), mss.get_bootSequence());
+ management::ManagementAgent* agent = updaterBroker.getManagementAgent();
+ if (agent) {
+ qmf::org::apache::qpid::broker::ManagementSetupState mss(b.getManagementAgent(), 0);
+ mss.set_objectNum(b.getManagementAgent()->getNextObjectId());
+ mss.set_bootSequence(b.getManagementAgent()->getBootSequence());
+ QPID_LOG(debug, updaterId << " updating management-setup-state " << mss.get_objectNum()
+ << " " << mss.get_bootSequence() << "\n");
+ ClusterConnectionProxy(session).managementSetupState(mss.get_objectNum(), mss.get_bootSequence());
+ }
}
void UpdateClient::updateExchange(const boost::shared_ptr<Exchange>& ex) {