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 | 539833c87b86871987dd0dff8944a60313c33728 (patch) | |
| tree | 262f90e87645d94d37800269e6d2ea1ad551b494 /qpid/cpp/src | |
| parent | 70fb857aae1737f31e0eb948f48d8e97332a660a (diff) | |
| download | qpid-python-539833c87b86871987dd0dff8944a60313c33728.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@1657964 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/amqp/Connection.cpp | 12 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/broker/amqp/Connection.cpp b/qpid/cpp/src/qpid/broker/amqp/Connection.cpp index 076af79411..8d6516edee 100644 --- a/qpid/cpp/src/qpid/broker/amqp/Connection.cpp +++ b/qpid/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/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp b/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp index 0969f76ae4..a0b16c2b4c 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp +++ b/qpid/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? |
