summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/RdmaIOPlugin.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-06-14 14:50:33 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-06-14 14:50:33 +0000
commitfb35f18b70e4009513fe5c8a042a9469ef178787 (patch)
tree1b9e9356e2582b43e66e8d845f7f2752b325f79d /cpp/src/qpid/sys/RdmaIOPlugin.cpp
parentc2c5d2e64c1a028aab392c23585c57801970c866 (diff)
downloadqpid-python-fb35f18b70e4009513fe5c8a042a9469ef178787.tar.gz
Combine Rdma::Buffer and ibv_sge needed to send it
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@954496 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/RdmaIOPlugin.cpp')
-rw-r--r--cpp/src/qpid/sys/RdmaIOPlugin.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/qpid/sys/RdmaIOPlugin.cpp b/cpp/src/qpid/sys/RdmaIOPlugin.cpp
index e3498fad47..044e6b465b 100644
--- a/cpp/src/qpid/sys/RdmaIOPlugin.cpp
+++ b/cpp/src/qpid/sys/RdmaIOPlugin.cpp
@@ -108,9 +108,9 @@ void RdmaIOHandler::write(const framing::ProtocolInitiation& data)
{
QPID_LOG(debug, "Rdma: SENT [" << identifier << "] INIT(" << data << ")");
Rdma::Buffer* buff = aio->getBuffer();
- framing::Buffer out(buff->bytes, buff->byteCount);
+ framing::Buffer out(buff->bytes(), buff->byteCount());
data.encode(out);
- buff->dataCount = data.encodedSize();
+ buff->dataCount(data.encodedSize());
aio->queueWrite(buff);
}
@@ -135,8 +135,8 @@ void RdmaIOHandler::idle(Rdma::AsynchIO&) {
if (codec == 0) return;
if (codec->canEncode()) {
Rdma::Buffer* buff = aio->getBuffer();
- size_t encoded=codec->encode(buff->bytes, buff->byteCount);
- buff->dataCount = encoded;
+ size_t encoded=codec->encode(buff->bytes(), buff->byteCount());
+ buff->dataCount(encoded);
aio->queueWrite(buff);
}
if (codec->isClosed())
@@ -178,7 +178,7 @@ void RdmaIOHandler::readbuff(Rdma::AsynchIO&, Rdma::Buffer* buff) {
size_t decoded = 0;
try {
if (codec) {
- decoded = codec->decode(buff->bytes+buff->dataStart, buff->dataCount);
+ decoded = codec->decode(buff->bytes(), buff->dataCount());
}else{
// Need to start protocol processing
initProtocolIn(buff);
@@ -191,7 +191,7 @@ void RdmaIOHandler::readbuff(Rdma::AsynchIO&, Rdma::Buffer* buff) {
}
void RdmaIOHandler::initProtocolIn(Rdma::Buffer* buff) {
- framing::Buffer in(buff->bytes+buff->dataStart, buff->dataCount);
+ framing::Buffer in(buff->bytes(), buff->dataCount());
framing::ProtocolInitiation protocolInit;
size_t decoded = 0;
if (protocolInit.decode(in)) {