qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1206350 - in /qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha: Backup.cpp WiringReplicator.cpp WiringReplicator.h
Date Fri, 25 Nov 2011 21:51:57 GMT
Author: aconway
Date: Fri Nov 25 21:51:56 2011
New Revision: 1206350

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

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

Modified: qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha/Backup.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha/Backup.cpp?rev=1206350&r1=1206349&r2=1206350&view=diff
==============================================================================
--- qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha/Backup.cpp (original)
+++ qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha/Backup.cpp Fri Nov 25 21:51:56 2011
@@ -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/qpid/cpp/src/qpid/ha/WiringReplicator.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha/WiringReplicator.cpp?rev=1206350&r1=1206349&r2=1206350&view=diff
==============================================================================
--- qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha/WiringReplicator.cpp (original)
+++ qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha/WiringReplicator.cpp Fri Nov 25 21:51:56
2011
@@ -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/qpid/cpp/src/qpid/ha/WiringReplicator.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha/WiringReplicator.h?rev=1206350&r1=1206349&r2=1206350&view=diff
==============================================================================
--- qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha/WiringReplicator.h (original)
+++ qpid/branches/qpid-3603/qpid/cpp/src/qpid/ha/WiringReplicator.h Fri Nov 25 21:51:56 2011
@@ -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