You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2014/01/06 21:13:52 UTC

svn commit: r1556014 - /qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp

Author: chug
Date: Mon Jan  6 20:13:52 2014
New Revision: 1556014

URL: http://svn.apache.org/r1556014
Log:
QPID-5418: Prevent qpidd from loading multiple store modules - Patch from Ernie Allen
Approved in https://reviews.apache.org/r/16573/


Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp?rev=1556014&r1=1556013&r2=1556014&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp Mon Jan  6 20:13:52 2014
@@ -417,6 +417,12 @@ boost::intrusive_ptr<Broker> Broker::cre
 
 void Broker::setStore (const boost::shared_ptr<MessageStore>& _store)
 {
+    // Exit now if multiple store plugins are attempting to load
+    if (!NullMessageStore::isNullStore(store.get())) {
+        QPID_LOG(error, "Multiple store plugins are not supported");
+        throw Exception(QPID_MSG("Failed to start broker: Multiple store plugins were loaded"));
+    }
+
     store.reset(new MessageStoreModule (_store));
     setStore();
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org