diff options
| author | Gordon Sim <gsim@apache.org> | 2012-10-19 17:15:17 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2012-10-19 17:15:17 +0000 |
| commit | 80de26c815520e813ab082113d9d431429eeef4a (patch) | |
| tree | 9a93bfb3a345b462828a650676fdd33267b8b47b /qpid/cpp | |
| parent | bf54ff4cc1d45414b51de78be9b970cd1f670847 (diff) | |
| download | qpid-python-80de26c815520e813ab082113d9d431429eeef4a.tar.gz | |
QPID-4368: Read any extra data available after protocol header
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1400172 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp | 3 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/sys/ssl/SslHandler.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp b/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp index 2e117a3fb7..e766a0527a 100644 --- a/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp +++ b/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp @@ -175,6 +175,9 @@ void AsynchIOHandler::readbuff(AsynchIO& , AsynchIO::BufferBase* buff) { write(framing::ProtocolInitiation(framing::highestProtocolVersion)); readError = true; aio->queueWriteClose(); + } else { + //read any further data that may already have been sent + decoded += codec->decode(buff->bytes+buff->dataStart+in.getPosition(), buff->dataCount-in.getPosition()); } } catch (const std::exception& e) { QPID_LOG(error, e.what()); diff --git a/qpid/cpp/src/qpid/sys/ssl/SslHandler.cpp b/qpid/cpp/src/qpid/sys/ssl/SslHandler.cpp index eeb8c26a76..8668c7d8d0 100644 --- a/qpid/cpp/src/qpid/sys/ssl/SslHandler.cpp +++ b/qpid/cpp/src/qpid/sys/ssl/SslHandler.cpp @@ -136,6 +136,9 @@ void SslHandler::readbuff(SslIO& , SslIO::BufferBase* buff) { write(framing::ProtocolInitiation(framing::highestProtocolVersion)); readError = true; aio->queueWriteClose(); + } else { + //read any further data that may already have been sent + decoded += codec->decode(buff->bytes+buff->dataStart+in.getPosition(), buff->dataCount-in.getPosition()); } } catch (const std::exception& e) { QPID_LOG(error, e.what()); |
