qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r741624 - /qpid/trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp
Date Fri, 06 Feb 2009 16:39:17 GMT
Author: aconway
Date: Fri Feb  6 16:39:17 2009
New Revision: 741624

URL: http://svn.apache.org/viewvc?rev=741624&view=rev
Log:
Fix seg fault if cluster and management are enabled.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp?rev=741624&r1=741623&r2=741624&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp Fri Feb  6 16:39:17 2009
@@ -109,6 +109,14 @@
     lastBroker(false),
     sequence(0)
 {
+    mAgent = ManagementAgent::Singleton::getInstance();
+    if (mAgent != 0){
+        _qmf::Package  packageInit(mAgent);
+        mgmtObject = new _qmf::Cluster (mAgent, this, &broker,name,myUrl.str());
+        mAgent->addObject (mgmtObject);
+        mgmtObject->set_status("JOINING");
+    }
+
     failoverExchange.reset(new FailoverExchange(this));
     if (quorum_) quorum.init();
     cpg.join(name);
@@ -125,13 +133,6 @@
     if (myUrl.empty())
         myUrl = Url::getIpAddressesUrl(broker.getPort(broker::Broker::TCP_TRANSPORT));
     QPID_LOG(notice, *this << " joining cluster " << name << " with url="
<< myUrl);
-    mAgent = ManagementAgent::Singleton::getInstance();
-    if (mAgent != 0){
-        _qmf::Package  packageInit(mAgent);
-        mgmtObject = new _qmf::Cluster (mAgent, this, &broker,name,myUrl.str());
-        mAgent->addObject (mgmtObject);
-        mgmtObject->set_status("JOINING");
-    }
     broker.getKnownBrokers = boost::bind(&Cluster::getUrls, this);
     dispatcher.start();
     deliverEventQueue.start();



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message