From ff152807775cf3ad146742a59bbe44146cbb9a34 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Thu, 23 Dec 2010 17:11:48 +0000 Subject: 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 --- cpp/src/qpid/sys/rdma/RdmaClient.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/sys/rdma/RdmaClient.cpp') 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(b->bytes()); uint32_t* lip = ip + b->dataCount() / sizeof(uint32_t); -- cgit v1.2.1