summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2014-01-06 20:13:52 +0000
committerCharles E. Rolke <chug@apache.org>2014-01-06 20:13:52 +0000
commit73b7d142fa7b37345f49255f1db41ce088fe9be5 (patch)
tree9ffd4717c26fb7f235d7b5f7883c8d528ff563e1 /cpp
parent84bf7e898d113890c66f7c4ee3e7fd8908cb1db9 (diff)
downloadqpid-python-73b7d142fa7b37345f49255f1db41ce088fe9be5.tar.gz
QPID-5418: Prevent qpidd from loading multiple store modules - Patch from Ernie Allen
Approved in https://reviews.apache.org/r/16573/ git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1556014 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/broker/Broker.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/Broker.cpp b/cpp/src/qpid/broker/Broker.cpp
index 9a5f05ccb2..975acfdb87 100644
--- a/cpp/src/qpid/broker/Broker.cpp
+++ b/cpp/src/qpid/broker/Broker.cpp
@@ -417,6 +417,12 @@ boost::intrusive_ptr<Broker> Broker::create(const Options& opts)
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();
}