summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2012-10-19 17:15:17 +0000
committerGordon Sim <gsim@apache.org>2012-10-19 17:15:17 +0000
commit4a1ff164ac41da054d5060aaac875a651b57ea20 (patch)
treed7226c54e5277465fe54f4e9f39f4b2aa0d7af91 /cpp/src
parentc15553ae8fc7e9ae9eec6459492dc1ab6af24aaa (diff)
downloadqpid-python-4a1ff164ac41da054d5060aaac875a651b57ea20.tar.gz
QPID-4368: Read any extra data available after protocol header
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1400172 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/sys/AsynchIOHandler.cpp3
-rw-r--r--cpp/src/qpid/sys/ssl/SslHandler.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/AsynchIOHandler.cpp b/cpp/src/qpid/sys/AsynchIOHandler.cpp
index 2e117a3fb7..e766a0527a 100644
--- a/cpp/src/qpid/sys/AsynchIOHandler.cpp
+++ b/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/cpp/src/qpid/sys/ssl/SslHandler.cpp b/cpp/src/qpid/sys/ssl/SslHandler.cpp
index eeb8c26a76..8668c7d8d0 100644
--- a/cpp/src/qpid/sys/ssl/SslHandler.cpp
+++ b/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());