summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/rdma/rdma_wrap.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-09-08 16:48:36 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-09-08 16:48:36 +0000
commitf1ca344c8126bd3bd079897a4e4c3f23affa5203 (patch)
treef0abeebba2f0c97753ecf47a1a5e8d21c8dcc466 /cpp/src/qpid/sys/rdma/rdma_wrap.cpp
parent18dc691d6bb3cdcc359f70cff064f51eeae51c4d (diff)
downloadqpid-python-f1ca344c8126bd3bd079897a4e4c3f23affa5203.tar.gz
Move the RDMA buffer tracking/destruction into the QueuePair class from
the RdmaIO class. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@995126 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/rdma/rdma_wrap.cpp')
-rw-r--r--cpp/src/qpid/sys/rdma/rdma_wrap.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/rdma/rdma_wrap.cpp b/cpp/src/qpid/sys/rdma/rdma_wrap.cpp
index 2581aaedcb..b046b012db 100644
--- a/cpp/src/qpid/sys/rdma/rdma_wrap.cpp
+++ b/cpp/src/qpid/sys/rdma/rdma_wrap.cpp
@@ -154,11 +154,15 @@ namespace Rdma {
// Reset back pointer in case someone else has the qp
qp->qp_context = 0;
+
+ // The buffers ptr_deque automatically deletes all the buffers we've allocated
}
// Create a buffer to use for writing
Buffer* QueuePair::createBuffer(int s) {
- return new Buffer(pd.get(), s);
+ Buffer* b = new Buffer(pd.get(), s);
+ buffers.push_front(b);
+ return b;
}
// Make channel non-blocking by making