summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/RdmaIOPlugin.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-01-26 20:45:03 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-01-26 20:45:03 +0000
commit832887152f0cfbb0ff1d9ca3d3c5624818ecc87d (patch)
tree70f94276df7fb709018d809bdf0f9f597f549d65 /cpp/src/qpid/sys/RdmaIOPlugin.cpp
parentfaeceaf81e73b23260d32503bc09e87f6ed2e735 (diff)
downloadqpid-python-832887152f0cfbb0ff1d9ca3d3c5624818ecc87d.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/sys/RdmaIOPlugin.cpp')
-rw-r--r--cpp/src/qpid/sys/RdmaIOPlugin.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/qpid/sys/RdmaIOPlugin.cpp b/cpp/src/qpid/sys/RdmaIOPlugin.cpp
index bd19247124..b325931793 100644
--- a/cpp/src/qpid/sys/RdmaIOPlugin.cpp
+++ b/cpp/src/qpid/sys/RdmaIOPlugin.cpp
@@ -305,16 +305,16 @@ void RdmaIOProtocolFactory::accept(Poller::shared_ptr poller, ConnectionCodec::F
sin.sin_port = htons(listeningPort);
sin.sin_addr.s_addr = INADDR_ANY;
- SocketAddress sa("",boost::lexical_cast<std::string>(listeningPort));
listener.reset(
- new Rdma::Listener(sa,
+ new Rdma::Listener(
Rdma::ConnectionParams(65536, Rdma::DEFAULT_WR_ENTRIES),
boost::bind(&RdmaIOProtocolFactory::established, this, poller, _1),
boost::bind(&RdmaIOProtocolFactory::connectionError, this, _1, _2),
boost::bind(&RdmaIOProtocolFactory::disconnected, this, _1),
boost::bind(&RdmaIOProtocolFactory::request, this, _1, _2, fact)));
- listener->start(poller);
+ SocketAddress sa("",boost::lexical_cast<std::string>(listeningPort));
+ listener->start(poller, sa);
}
// Only used for outgoing connections (in federation)
@@ -337,17 +337,16 @@ void RdmaIOProtocolFactory::connect(
ConnectionCodec::Factory* f,
ConnectFailedCallback failed)
{
- SocketAddress sa(host, boost::lexical_cast<std::string>(port));
Rdma::Connector* c =
new Rdma::Connector(
- sa,
Rdma::ConnectionParams(8000, Rdma::DEFAULT_WR_ENTRIES),
boost::bind(&RdmaIOProtocolFactory::connected, this, poller, _1, _2, f),
boost::bind(&RdmaIOProtocolFactory::connectionError, this, _1, _2),
boost::bind(&RdmaIOProtocolFactory::disconnected, this, _1),
boost::bind(&RdmaIOProtocolFactory::rejected, this, _1, _2, failed));
- c->start(poller);
+ SocketAddress sa(host, boost::lexical_cast<std::string>(port));
+ c->start(poller, sa);
}
}} // namespace qpid::sys