qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r718983 - in /incubator/qpid/trunk/qpid/cpp/src: qpid/cluster/Cluster.cpp qpidd.cpp
Date Wed, 19 Nov 2008 15:36:16 GMT
Author: aconway
Date: Wed Nov 19 07:36:16 2008
New Revision: 718983

URL: http://svn.apache.org/viewvc?rev=718983&view=rev
Log:
Fix seg fault caused by exceptiosn thrown in Cluster ctor.

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

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp?rev=718983&r1=718982&r2=718983&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp Wed Nov 19 07:36:16 2008
@@ -113,12 +113,12 @@
     }
     broker.getKnownBrokers = boost::bind(&Cluster::getUrls, this);
     failoverExchange.reset(new FailoverExchange(this));
-    broker.addFinalizer(boost::bind(&Cluster::brokerShutdown, this));
     cpgDispatchHandle.startWatch(poller);
     deliverQueue.start();
     QPID_LOG(notice, *this << " joining cluster " << name.str());
     if (useQuorum) quorum.init();
     cpg.join(name);
+    broker.addFinalizer(boost::bind(&Cluster::brokerShutdown, this)); // Must be last
for exception safety.
 }
 
 Cluster::~Cluster() {

Modified: incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp?rev=718983&r1=718982&r2=718983&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp Wed Nov 19 07:36:16 2008
@@ -23,6 +23,7 @@
 #include "qpid/Plugin.h"
 #include "qpid/Version.h"
 #include "qpid/log/Logger.h"
+#include "qpid/log/Statement.h"
 #include "qpid/sys/Shlib.h"
 
 #include <iostream>
@@ -76,7 +77,7 @@
         return broker.execute(options.get());
     }
     catch(const exception& e) {
-        cerr << e.what() << endl;
+        QPID_LOG(critical, "Broker start-up failed: " << e.what());
     }
     return 1;
 }



Mime
View raw message