diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2009-06-08 14:34:45 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2009-06-08 14:34:45 +0000 |
| commit | 4274737d8315848edc4fa0ccb534482202ce5658 (patch) | |
| tree | ef8e34f05278aa13c2e41425156a3d5a6a08ffc2 /cpp/src/qpid/amqp_0_10/Connection.cpp | |
| parent | a811f1b32a6d3e1b9a39c36829ac6847ed6d8e42 (diff) | |
| download | qpid-python-4274737d8315848edc4fa0ccb534482202ce5658.tar.gz | |
Plumbed in an a connection abort operation to the OutputHandler
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@782649 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/amqp_0_10/Connection.cpp')
| -rw-r--r-- | cpp/src/qpid/amqp_0_10/Connection.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cpp/src/qpid/amqp_0_10/Connection.cpp b/cpp/src/qpid/amqp_0_10/Connection.cpp index 5b14d60ff5..34134150da 100644 --- a/cpp/src/qpid/amqp_0_10/Connection.cpp +++ b/cpp/src/qpid/amqp_0_10/Connection.cpp @@ -7,9 +7,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -72,7 +72,7 @@ size_t Connection::encode(const char* buffer, size_t size) { { // Swap frameQueue data into workQueue to avoid holding lock while we encode. Mutex::ScopedLock l(frameQueueLock); assert(workQueue.empty()); - workQueue.swap(frameQueue); + workQueue.swap(frameQueue); } framing::Buffer out(const_cast<char*>(buffer), size); if (!isClient && !initialized) { @@ -88,7 +88,7 @@ size_t Connection::encode(const char* buffer, size_t size) { QPID_LOG(trace, "SENT [" << identifier << "]: " << workQueue.front()); workQueue.pop_front(); encoded += frameSize; - if (workQueue.empty() && out.available() > 0) connection->doOutput(); + if (workQueue.empty() && out.available() > 0) connection->doOutput(); } assert(workQueue.empty() || workQueue.front().encodedSize() <= size); if (!workQueue.empty() && workQueue.front().encodedSize() > size) @@ -103,7 +103,8 @@ size_t Connection::encode(const char* buffer, size_t size) { return out.getPosition(); } -void Connection::activateOutput() { output.activateOutput(); } +void Connection::abort() { output.abort(); } +void Connection::activateOutput() { output.activateOutput(); } void Connection::giveReadCredit(int32_t credit) { output.giveReadCredit(credit); } void Connection::close() { @@ -130,7 +131,7 @@ framing::ProtocolVersion Connection::getVersion() const { return framing::ProtocolVersion(0,10); } -size_t Connection::getBuffered() const { +size_t Connection::getBuffered() const { Mutex::ScopedLock l(frameQueueLock); return buffered; } |
