From 832887152f0cfbb0ff1d9ca3d3c5624818ecc87d Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 26 Jan 2010 20:45:03 +0000 Subject: Fix memory error in previous SocketAddress refactoring git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@903407 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/RdmaConnector.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/client') diff --git a/cpp/src/qpid/client/RdmaConnector.cpp b/cpp/src/qpid/client/RdmaConnector.cpp index d67a0fcb2e..fbf4e02f69 100644 --- a/cpp/src/qpid/client/RdmaConnector.cpp +++ b/cpp/src/qpid/client/RdmaConnector.cpp @@ -49,7 +49,7 @@ using namespace qpid::framing; using boost::format; using boost::str; - class RdmaConnector : public Connector, public sys::Codec +class RdmaConnector : public Connector, public sys::Codec { struct Buff; @@ -164,17 +164,17 @@ void RdmaConnector::connect(const std::string& host, int port){ Mutex::ScopedLock l(pollingLock); assert(!polling); - SocketAddress sa(host, boost::lexical_cast(port)); Rdma::Connector* c = new Rdma::Connector( - sa, Rdma::ConnectionParams(maxFrameSize, Rdma::DEFAULT_WR_ENTRIES), boost::bind(&RdmaConnector::connected, this, poller, _1, _2), boost::bind(&RdmaConnector::connectionError, this, poller, _1, _2), boost::bind(&RdmaConnector::disconnected, this, poller, _1), boost::bind(&RdmaConnector::rejected, this, poller, _1, _2)); + polling = true; - c->start(poller); + SocketAddress sa(host, boost::lexical_cast(port)); + c->start(poller, sa); } // The following only gets run when connected -- cgit v1.2.1