diff options
author | Alan Conway <aconway@apache.org> | 2011-11-25 21:51:56 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2011-11-25 21:51:56 +0000 |
commit | ce3fd6c945882f570e77072a9067c754e5721254 (patch) | |
tree | 44052c01a9c55cbef9004680a2727b59ce19bcfd | |
parent | a3101943e1facd947c4a9e9a3ac3c07d9e78606e (diff) | |
download | qpid-python-ce3fd6c945882f570e77072a9067c754e5721254.tar.gz |
QPID-3603: Minor refactor, got rid of WiringReplicator::initialize.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-3603@1206350 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/ha/Backup.cpp | 1 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/ha/WiringReplicator.cpp | 7 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/ha/WiringReplicator.h | 3 |
3 files changed, 1 insertions, 10 deletions
diff --git a/qpid/cpp/src/qpid/ha/Backup.cpp b/qpid/cpp/src/qpid/ha/Backup.cpp index ceea6ccb68..300621860b 100644 --- a/qpid/cpp/src/qpid/ha/Backup.cpp +++ b/qpid/cpp/src/qpid/ha/Backup.cpp @@ -57,7 +57,6 @@ Backup::Backup(broker::Broker& b, const Settings& s) : broker(b), settings(s) { link = result.first; boost::shared_ptr<WiringReplicator> wr(new WiringReplicator(link)); broker.getExchanges().registerExchange(wr); - wr->initialize(); // Must be called after registering exchange. } } diff --git a/qpid/cpp/src/qpid/ha/WiringReplicator.cpp b/qpid/cpp/src/qpid/ha/WiringReplicator.cpp index 2c37fa37d3..c89df85503 100644 --- a/qpid/cpp/src/qpid/ha/WiringReplicator.cpp +++ b/qpid/cpp/src/qpid/ha/WiringReplicator.cpp @@ -163,12 +163,7 @@ WiringReplicator::~WiringReplicator() {} WiringReplicator::WiringReplicator(const boost::shared_ptr<Link>& l) : Exchange(QPID_WIRING_REPLICATOR), broker(*l->getBroker()), link(l) -{} - -// We need to split out the initialization so that the WiringReplicator -// can be registered as an exchange before starting the bridge. -void WiringReplicator::initialize() { - assert(link->getBroker()); +{ broker.getLinks().declare( link->getHost(), link->getPort(), false, // durable diff --git a/qpid/cpp/src/qpid/ha/WiringReplicator.h b/qpid/cpp/src/qpid/ha/WiringReplicator.h index fa4cf33b6e..55d6130cb8 100644 --- a/qpid/cpp/src/qpid/ha/WiringReplicator.h +++ b/qpid/cpp/src/qpid/ha/WiringReplicator.h @@ -48,9 +48,6 @@ class WiringReplicator : public broker::Exchange ~WiringReplicator(); std::string getType() const; - // Call this after the WiringReplicator has been registered as an exchange. - void initialize(); - // Exchange methods bool bind(boost::shared_ptr<broker::Queue>, const std::string&, const framing::FieldTable*); bool unbind(boost::shared_ptr<broker::Queue>, const std::string&, const framing::FieldTable*); |