activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r751710 - /activemq/activemq-cpp/trunk/src/main/activemq/state/ConnectionStateTracker.cpp
Date Mon, 09 Mar 2009 15:40:52 GMT
Author: tabish
Date: Mon Mar  9 15:40:51 2009
New Revision: 751710

URL: http://svn.apache.org/viewvc?rev=751710&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-100

Fix an issue with the state tracker throwing an exception when the track method is called.

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/state/ConnectionStateTracker.cpp

Modified: activemq/activemq-cpp/trunk/src/main/activemq/state/ConnectionStateTracker.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/state/ConnectionStateTracker.cpp?rev=751710&r1=751709&r2=751710&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/state/ConnectionStateTracker.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/state/ConnectionStateTracker.cpp Mon Mar
 9 15:40:51 2009
@@ -80,7 +80,13 @@
     throw( decaf::io::IOException ) {
 
     try{
-        return command->visit( this ).dynamicCast<Tracked, Pointer<Tracked>::CounterType>();
+
+        Pointer<Command> result = command->visit( this );
+        if( result == NULL ) {
+            return Pointer<Tracked>();
+        } else {
+            return result.dynamicCast<Tracked, Pointer<Tracked>::CounterType >();
+        }
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )



Mime
View raw message