summaryrefslogtreecommitdiff
path: root/qpid/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
commit3faa026404cbbae5f998f8bc5a07e524ad4cf620 (patch)
tree7e29ac1ef84c813a897ac8e427bba8f0f4b8705c /qpid/cpp
parent4b1aaf78d8d9748c0f3d0e0cc4ccb30601f7358e (diff)
downloadqpid-python-3faa026404cbbae5f998f8bc5a07e524ad4cf620.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@1556014 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/broker/Broker.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/broker/Broker.cpp b/qpid/cpp/src/qpid/broker/Broker.cpp
index 9a5f05ccb2..975acfdb87 100644
--- a/qpid/cpp/src/qpid/broker/Broker.cpp
+++ b/qpid/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();
}