activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq-cpp git commit: https://issues.apache.org/jira/browse/AMQCPP-534
Date Fri, 13 Feb 2015 16:13:31 GMT
Repository: activemq-cpp
Updated Branches:
  refs/heads/3.8.x b8d5e03b0 -> b42682859


https://issues.apache.org/jira/browse/AMQCPP-534

Ensure valid callback reference always set.


Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/b4268285
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/b4268285
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/b4268285

Branch: refs/heads/3.8.x
Commit: b426828593ca61c07a2bd12c63f4558c11e9f326
Parents: b8d5e03
Author: Timothy Bish <tabish121@gmail.com>
Authored: Fri Feb 13 11:01:32 2015 -0500
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Fri Feb 13 11:05:00 2015 -0500

----------------------------------------------------------------------
 activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/b4268285/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp b/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
index 0569f97..1d22152 100644
--- a/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
+++ b/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
@@ -37,6 +37,7 @@
 #include <activemq/util/IdGenerator.h>
 #include <activemq/transport/failover/FailoverTransport.h>
 #include <activemq/transport/ResponseCallback.h>
+#include <activemq/transport/DefaultTransportListener.h>
 
 #include <decaf/lang/Math.h>
 #include <decaf/lang/Boolean.h>
@@ -141,6 +142,7 @@ namespace core{
     public:
 
         static util::IdGenerator CONNECTION_ID_GENERATOR;
+        static DefaultTransportListener DO_NOTHING_TRANSPORT_LISTENER;
 
         Pointer<decaf::util::Properties> properties;
         Pointer<transport::Transport> transport;
@@ -309,6 +311,7 @@ namespace core{
 
     // Static init.
     util::IdGenerator ConnectionConfig::CONNECTION_ID_GENERATOR;
+    DefaultTransportListener ConnectionConfig::DO_NOTHING_TRANSPORT_LISTENER;
 
     class ConnectionErrorRunnable : public Runnable {
     private:
@@ -912,7 +915,7 @@ void ActiveMQConnection::disconnect(long long lastDeliveredSequenceId)
{
     try {
 
         // Clear the listener, we don't care about async errors at this point.
-        this->config->transport->setTransportListener(NULL);
+        this->config->transport->setTransportListener(&ConnectionConfig::DO_NOTHING_TRANSPORT_LISTENER);
 
         // Allow the Support class to shutdown its resources, including the Transport.
         bool hasException = false;


Mime
View raw message