You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2013/09/04 22:27:29 UTC

svn commit: r1520133 - /qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp

Author: chug
Date: Wed Sep  4 20:27:29 2013
New Revision: 1520133

URL: http://svn.apache.org/r1520133
Log:
NO-JIRA: repair build for VisualStudio 2010 and newer Boost
vector::push_back now has two signatures that confuse boost.
Use an explicit callback and do the push_back there.
This is a replay of r1418544.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp?rev=1520133&r1=1520132&r2=1520133&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp Wed Sep  4 20:27:29 2013
@@ -903,6 +903,13 @@ void BrokerReplicator::disconnectedExcha
 
 typedef vector<boost::shared_ptr<Exchange> > ExchangeVector;
 
+// Callback function for accumulating exchange candidates
+namespace {
+	void exchangeAccumulatorCallback(ExchangeVector& ev, const Exchange::shared_ptr& i) {
+		ev.push_back(i);
+	}
+}
+
 // Called by ConnectionObserver::disconnected, disconnected from the network side.
 void BrokerReplicator::disconnected() {
     QPID_LOG(info, logPrefix << "Disconnected from primary " << primary);
@@ -910,7 +917,7 @@ void BrokerReplicator::disconnected() {
 
     // Make copy of exchanges so we can work outside the registry lock.
     ExchangeVector exs;
-    exchanges.eachExchange(boost::bind(&ExchangeVector::push_back, &exs, _1));
+    exchanges.eachExchange(boost::bind(&exchangeAccumulatorCallback, boost::ref(exs), _1));
     for_each(exs.begin(), exs.end(),
              boost::bind(&BrokerReplicator::disconnectedExchange, this, _1));
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org