Author: astitcher Date: Tue Jul 28 03:23:49 2009 New Revision: 798383 URL: http://svn.apache.org/viewvc?rev=798383&view=rev Log: Add a default constructor to LinkRegistry so that you don't need a broker to create one for the store tests
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h Modified: qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp?rev=798383&r1=798382&r2=798383&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp Tue Jul 28 03:23:49 2009 @@ -36,8 +36,21 @@ #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))); } Modified: qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h?rev=798383&r1=798382&r2=798383&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h Tue Jul 28 03:23:49 2009 @@ -75,6 +75,7 @@ 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, --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org