Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0E351777B for ; Fri, 25 Nov 2011 21:52:21 +0000 (UTC) Received: (qmail 6315 invoked by uid 500); 25 Nov 2011 21:52:21 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 6299 invoked by uid 500); 25 Nov 2011 21:52:21 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 6292 invoked by uid 99); 25 Nov 2011 21:52:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Nov 2011 21:52:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Nov 2011 21:52:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 871252388A64 for ; Fri, 25 Nov 2011 21:51:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@qpid.apache.org From: aconway@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111125215157.871252388A64@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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& 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, const std::string&, const framing::FieldTable*); bool unbind(boost::shared_ptr, const std::string&, const framing::FieldTable*); --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscribe@qpid.apache.org