summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/rdma/RdmaClient.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-12-23 17:11:48 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-12-23 17:11:48 +0000
commitff152807775cf3ad146742a59bbe44146cbb9a34 (patch)
tree19f87a8d23341e1d14ff5138d4f968867db174cd /cpp/src/qpid/sys/rdma/RdmaClient.cpp
parent0f8775149a61e04a9e514f28a2bd35766b3ca991 (diff)
downloadqpid-python-ff152807775cf3ad146742a59bbe44146cbb9a34.tar.gz
Changes due to review comments from Doug Ledford:
- Removed lock unsafe operation Rdma::QueuePair::bufferAvailable() and replaced the unavailable case with failing getBuffer(). - Improved asserts in the Rdma::QueuePair::getBuffer() code. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1052330 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/rdma/RdmaClient.cpp')
-rw-r--r--cpp/src/qpid/sys/rdma/RdmaClient.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/rdma/RdmaClient.cpp b/cpp/src/qpid/sys/rdma/RdmaClient.cpp
index 67c672f857..e53ebb0520 100644
--- a/cpp/src/qpid/sys/rdma/RdmaClient.cpp
+++ b/cpp/src/qpid/sys/rdma/RdmaClient.cpp
@@ -93,8 +93,9 @@ Xor128Generator output;
Xor128Generator input;
void write(Rdma::AsynchIO& aio) {
- while (aio.writable() && aio.bufferAvailable() && smsgs < target) {
+ while (aio.writable() && smsgs < target) {
Rdma::Buffer* b = aio.getBuffer();
+ if (!b) break;
b->dataCount(msgsize);
uint32_t* ip = reinterpret_cast<uint32_t*>(b->bytes());
uint32_t* lip = ip + b->dataCount() / sizeof(uint32_t);