diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2008-09-19 14:15:54 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2008-09-19 14:15:54 +0000 |
| commit | 7afcca6c7f08224ad5c7b44d8215f4c68c08dd65 (patch) | |
| tree | a5e74c27844ce87319f7f2c482ce4beddc7bb0c5 /cpp/src/qpid/client/RdmaConnector.cpp | |
| parent | efa73f05b8b5e300c46ff6ab78c334f5d8b7fa2b (diff) | |
| download | qpid-python-7afcca6c7f08224ad5c7b44d8215f4c68c08dd65.tar.gz | |
RDMA bugfixes:
- Changed Rdma connection creation to allocate all necessary buffer
memory immediately. This has the effect that no later buffer allocations happen
which can fail so that once accepted connections won't fail because of lack of
locked memory.
- Fixed connection logic so we reject a new connection if we can't create the necessary
handlers rather than kill the entire broker (this includes not enough locked memory)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@697101 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/RdmaConnector.cpp')
| -rw-r--r-- | cpp/src/qpid/client/RdmaConnector.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/RdmaConnector.cpp b/cpp/src/qpid/client/RdmaConnector.cpp index c0775ab9cd..1a85cbb4bc 100644 --- a/cpp/src/qpid/client/RdmaConnector.cpp +++ b/cpp/src/qpid/client/RdmaConnector.cpp @@ -305,6 +305,7 @@ void RdmaConnector::Writer::init(std::string id, Rdma::AsynchIO* a) { Mutex::ScopedLock l(lock); identifier = id; aio = a; + assert(aio->bufferAvailable()); newBuffer(); } void RdmaConnector::Writer::handle(framing::AMQFrame& frame) { @@ -346,7 +347,7 @@ void RdmaConnector::Writer::write(Rdma::AsynchIO&) { if (lastEof==0) return; size_t bytesWritten = 0; - while (aio->writable() && !frames.empty()) { + while (aio->writable() && aio->bufferAvailable() && !frames.empty()) { const AMQFrame* frame = &frames.front(); uint32_t size = frame->size(); while (size <= encode.available()) { |
