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 )