summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/Connection.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-11-28 17:13:28 +0000
committerAlan Conway <aconway@apache.org>2007-11-28 17:13:28 +0000
commit2b1b179702863e8e6d077c025f5244eaa461a990 (patch)
tree723d5b63eaa9d211ef2e119ec612bc8ad59cbf07 /cpp/src/qpid/broker/Connection.cpp
parent4c3d7def3ec41f44744d8f96e5229022b326b4fa (diff)
downloadqpid-python-2b1b179702863e8e6d077c025f5244eaa461a990.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/broker/Connection.cpp')
-rw-r--r--cpp/src/qpid/broker/Connection.cpp19
1 files changed, 10 insertions, 9 deletions
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 <iostream>
-#include <assert.h>
-
#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 <boost/bind.hpp>
#include <algorithm>
+#include <iostream>
+#include <assert.h>
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);
}
}}