qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kgiu...@apache.org
Subject svn commit: r1657964 - in /qpid/trunk/qpid/cpp/src/qpid: broker/amqp/Connection.cpp messaging/amqp/ConnectionContext.cpp
Date Fri, 06 Feb 2015 21:10:24 GMT
Author: kgiusti
Date: Fri Feb  6 21:10:24 2015
New Revision: 1657964

URL: http://svn.apache.org/r1657964
Log:
QPID-5538: patch to work with older version of proton (0.7)

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Connection.cpp
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Connection.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Connection.cpp?rev=1657964&r1=1657963&r2=1657964&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Connection.cpp Fri Feb  6 21:10:24 2015
@@ -221,7 +221,11 @@ size_t Connection::decode(const char* bu
         }
         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,
         }
         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;

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp?rev=1657964&r1=1657963&r2=1657964&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp Fri Feb  6 21:10:24
2015
@@ -793,7 +793,11 @@ std::size_t ConnectionContext::decodePla
         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::encodePla
         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?



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message