diff options
| author | Ken Giusti <kgiusti@apache.org> | 2015-02-06 21:10:24 +0000 |
|---|---|---|
| committer | Ken Giusti <kgiusti@apache.org> | 2015-02-06 21:10:24 +0000 |
| commit | cf6e82010ed786086deb8454d13fb2ccc719d3a3 (patch) | |
| tree | f1734634cfc6180ac53ee6808d15ec282fb8f1e7 /cpp | |
| parent | 0206de690f9ffa1a7ca04aaef840830f491e0979 (diff) | |
| download | qpid-python-cf6e82010ed786086deb8454d13fb2ccc719d3a3.tar.gz | |
QPID-5538: patch to work with older version of proton (0.7)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1657964 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/src/qpid/broker/amqp/Connection.cpp | 12 | ||||
| -rw-r--r-- | cpp/src/qpid/messaging/amqp/ConnectionContext.cpp | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/cpp/src/qpid/broker/amqp/Connection.cpp b/cpp/src/qpid/broker/amqp/Connection.cpp index 076af79411..8d6516edee 100644 --- a/cpp/src/qpid/broker/amqp/Connection.cpp +++ b/cpp/src/qpid/broker/amqp/Connection.cpp @@ -221,7 +221,11 @@ size_t Connection::decode(const char* buffer, size_t size) } return n; } else if (n == PN_ERR) { - throw Exception(qpid::amqp::error_conditions::DECODE_ERROR, QPID_MSG("Error on input: " << getError())); + std::string error; + checkTransportError(error); + QPID_LOG_CAT(error, network, id << " connection error: " << error); + out.abort(); + return 0; } else { return 0; } @@ -246,7 +250,11 @@ size_t Connection::encode(char* buffer, size_t size) } return 0; } else if (n == PN_ERR) { - throw Exception(qpid::amqp::error_conditions::INTERNAL_ERROR, QPID_MSG("Error on output: " << getError())); + std::string error; + checkTransportError(error); + QPID_LOG_CAT(error, network, id << " connection error: " << error); + out.abort(); + return 0; } else { haveOutput = false; return 0; diff --git a/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp b/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp index 0969f76ae4..a0b16c2b4c 100644 --- a/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp +++ b/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp @@ -793,7 +793,11 @@ std::size_t ConnectionContext::decodePlain(const char* buffer, std::size_t size) lock.notifyAll(); return n; } else if (n == PN_ERR) { - throw MessagingException(QPID_MSG("Error on input: " << getError())); + std::string error; + checkTransportError(error); + QPID_LOG_CAT(error, network, id << " connection error: " << error); + transport->abort(); + return 0; } else { return 0; } @@ -818,7 +822,11 @@ std::size_t ConnectionContext::encodePlain(char* buffer, std::size_t size) if (notifyOnWrite) lock.notifyAll(); return n; } else if (n == PN_ERR) { - throw MessagingException(QPID_MSG("Error on output: " << getError())); + std::string error; + checkTransportError(error); + QPID_LOG_CAT(error, network, id << " connection error: " << error); + transport->abort(); + return 0; } else if (n == PN_EOS) { haveOutput = false; // Normal close, or error? |
