activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r517462 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Date Mon, 12 Mar 2007 23:46:55 GMT
Author: tabish
Date: Mon Mar 12 16:46:54 2007
New Revision: 517462

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

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp?view=diff&rev=517462&r1=517461&r2=517462
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Mon Mar 12 16:46:54 2007
@@ -1221,16 +1221,13 @@
 
         commands::DataStructure* dataStructure = NULL;
 
-        OpenWireConsumerInfo* consumer =
-            dynamic_cast<OpenWireConsumerInfo*>(resource);
-        OpenWireProducerInfo* producer =
-            dynamic_cast<OpenWireProducerInfo*>(resource);
-        OpenWireSessionInfo* session =
-            dynamic_cast<OpenWireSessionInfo*>(resource);
         commands::ActiveMQTempDestination* tempDestination =
             dynamic_cast<commands::ActiveMQTempDestination*>(resource);
 
-        if( consumer != NULL ) {
+        if( typeid( *resource ) == typeid( OpenWireConsumerInfo ) ) {
+
+            OpenWireConsumerInfo* consumer =
+                dynamic_cast<OpenWireConsumerInfo*>(resource);
 
             // Remove this consumer from the consumer info map
             synchronized( &consumerInfoMap ) {
@@ -1239,10 +1236,17 @@
             }
 
             dataStructure = consumer->getConsumerInfo()->getConsumerId();
-        } else if( producer != NULL ) {
+        } else if( typeid( *resource ) == typeid( OpenWireProducerInfo ) ) {
+            OpenWireProducerInfo* producer =
+                dynamic_cast<OpenWireProducerInfo*>( resource );
             dataStructure = producer->getProducerInfo()->getProducerId();
-        } else if( session != NULL ) {
+        } else if( typeid( *resource ) == typeid( OpenWireSessionInfo ) ) {
+            OpenWireSessionInfo* session =
+                dynamic_cast<OpenWireSessionInfo*>(resource);
             dataStructure = session->getSessionInfo()->getSessionId();
+        } else if( typeid( *resource ) == typeid( OpenWireTransactionInfo ) ) {
+            delete resource;
+            return;
         } else if( tempDestination != NULL ) {
             // User deletes these
             destroyTemporaryDestination( tempDestination );



Mime
View raw message