From 2b1b179702863e8e6d077c025f5244eaa461a990 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 28 Nov 2007 17:13:28 +0000 Subject: Fixed to build with boost 1.34 as well as boost 1.33 - boost::ptr_map API changed. - Boost.Test unit test framework changes. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@599067 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Connection.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'cpp/src/qpid/broker/Connection.cpp') diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp index f981d47ef7..26146e80d4 100644 --- a/cpp/src/qpid/broker/Connection.cpp +++ b/cpp/src/qpid/broker/Connection.cpp @@ -18,24 +18,26 @@ * under the License. * */ -#include "qpid/log/Statement.h" -#include -#include - #include "Connection.h" #include "SessionState.h" -#include "qpid/framing/AMQP_ClientProxy.h" #include "BrokerAdapter.h" #include "SemanticHandler.h" +#include "qpid/log/Statement.h" +#include "qpid/ptr_map.h" +#include "qpid/framing/AMQP_ClientProxy.h" + #include #include +#include +#include using namespace boost; using namespace qpid::sys; using namespace qpid::framing; using namespace qpid::sys; +using namespace qpid::ptr_map; namespace qpid { namespace broker { @@ -77,9 +79,8 @@ void Connection::idleIn(){} void Connection::closed(){ // Physically closed, suspend open sessions. try { - std::for_each( - channels.begin(), channels.end(), - boost::bind(&SessionHandler::localSuspend, _1)); + for (ChannelMap::iterator i = channels.begin(); i != channels.end(); ++i) + get_pointer(i)->localSuspend(); while (!exclusiveQueues.empty()) { Queue::shared_ptr q(exclusiveQueues.front()); q->releaseExclusiveOwnership(); @@ -105,7 +106,7 @@ SessionHandler& Connection::getChannel(ChannelId id) { if (i == channels.end()) { i = channels.insert(id, new SessionHandler(*this, id)).first; } - return *i; + return *get_pointer(i); } }} -- cgit v1.2.1