qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1233645 - in /qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha: Backup.cpp WiringReplicator.cpp WiringReplicator.h
Date Thu, 19 Jan 2012 23:03:39 GMT
Author: aconway
Date: Thu Jan 19 23:03:38 2012
New Revision: 1233645

URL: http://svn.apache.org/viewvc?rev=1233645&view=rev
Log:
QPID-3603: Minor refactor, got rid of WiringReplicator::initialize.

Modified:
    qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/Backup.cpp
    qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/WiringReplicator.cpp
    qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/WiringReplicator.h

Modified: qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/Backup.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/Backup.cpp?rev=1233645&r1=1233644&r2=1233645&view=diff
==============================================================================
--- qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/Backup.cpp (original)
+++ qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/Backup.cpp Thu Jan 19 23:03:38 2012
@@ -57,7 +57,6 @@ Backup::Backup(broker::Broker& b, const 
         link = result.first;
         boost::shared_ptr<WiringReplicator> wr(new WiringReplicator(link));
         broker.getExchanges().registerExchange(wr);
-        wr->initialize();       // Must be called after registering exchange.
     }
 }
 

Modified: qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/WiringReplicator.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/WiringReplicator.cpp?rev=1233645&r1=1233644&r2=1233645&view=diff
==============================================================================
--- qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/WiringReplicator.cpp (original)
+++ qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/WiringReplicator.cpp Thu Jan 19 23:03:38
2012
@@ -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

Modified: qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/WiringReplicator.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/WiringReplicator.h?rev=1233645&r1=1233644&r2=1233645&view=diff
==============================================================================
--- qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/WiringReplicator.h (original)
+++ qpid/branches/qpid-3603-2/qpid/cpp/src/qpid/ha/WiringReplicator.h Thu Jan 19 23:03:38
2012
@@ -48,9 +48,6 @@ class WiringReplicator : public broker::
     ~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*);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message