summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-07-28 03:23:49 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-07-28 03:23:49 +0000
commit2e630e525db8c8a0ac53ef6fcf21297bdef48f11 (patch)
tree4bbf8b30043e39dd484b35a87cbb8ab2e1370f09 /qpid/cpp/src
parenta9888cf7ff9fa37e4f8c6c172eaded73dfdd5ab2 (diff)
downloadqpid-python-2e630e525db8c8a0ac53ef6fcf21297bdef48f11.tar.gz
Add a default constructor to LinkRegistry so that you don't need
a broker to create one for the store tests git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@798383 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/broker/LinkRegistry.cpp17
-rw-r--r--qpid/cpp/src/qpid/broker/LinkRegistry.h1
2 files changed, 16 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/broker/LinkRegistry.cpp b/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
index fce3a88cd1..10e5359493 100644
--- a/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
+++ b/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
@@ -36,8 +36,21 @@ namespace _qmf = qmf::org::apache::qpid::broker;
#define LINK_MAINT_INTERVAL 2
-LinkRegistry::LinkRegistry (Broker* _broker) : broker(_broker), parent(0), store(0), passive(false), passiveChanged(false),
- realm(broker ? broker->getOptions().realm : "")
+// TODO: This constructor is only used by the store unit tests -
+// That probably indicates that LinkRegistry isn't correctly
+// factored: The persistence element and maintenance element
+// should be factored separately
+LinkRegistry::LinkRegistry () :
+ broker(0),
+ parent(0), store(0), passive(false), passiveChanged(false),
+ realm("")
+{
+}
+
+LinkRegistry::LinkRegistry (Broker* _broker) :
+ broker(_broker),
+ parent(0), store(0), passive(false), passiveChanged(false),
+ realm("")
{
timer.add (intrusive_ptr<TimerTask> (new Periodic(*this)));
}
diff --git a/qpid/cpp/src/qpid/broker/LinkRegistry.h b/qpid/cpp/src/qpid/broker/LinkRegistry.h
index bfdf0d491b..8d1a252f54 100644
--- a/qpid/cpp/src/qpid/broker/LinkRegistry.h
+++ b/qpid/cpp/src/qpid/broker/LinkRegistry.h
@@ -75,6 +75,7 @@ namespace broker {
static std::string createKey(const TcpAddress& address);
public:
+ LinkRegistry (); // Only used in store tests
LinkRegistry (Broker* _broker);
std::pair<boost::shared_ptr<Link>, bool>
declare(std::string& host,