activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r517053 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessageBase.h
Date Mon, 12 Mar 2007 00:05:31 GMT
Author: tabish
Date: Sun Mar 11 17:05:30 2007
New Revision: 517053

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

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessageBase.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessageBase.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessageBase.h?view=diff&rev=517053&r1=517052&r2=517053
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessageBase.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQMessageBase.h
Sun Mar 11 17:05:30 2007
@@ -507,9 +507,15 @@
          * @param destination - Destination Object
          */
         virtual void setCMSDestination( const cms::Destination* destination ) {
-            this->setDestination(
-                dynamic_cast<ActiveMQDestination*>(
-                    destination->clone() ) );
+
+            delete getDestination();
+            if( destination != NULL ) {
+                this->setDestination(
+                    dynamic_cast<ActiveMQDestination*>(
+                        destination->clone() ) );
+            } else {
+                this->setDestination( NULL );
+            }
         }
 
         /**
@@ -586,9 +592,15 @@
          * @param id - Reply To value
          */
         virtual void setCMSReplyTo( const cms::Destination* destination ) {
-            this->setReplyTo(
-                dynamic_cast<ActiveMQDestination*>(
-                    destination->clone() ) );
+
+            delete getReplyTo();
+            if( destination != NULL ) {
+                this->setReplyTo(
+                    dynamic_cast<ActiveMQDestination*>(
+                        destination->clone() ) );
+            } else {
+                this->setReplyTo( NULL );
+            }
         }
 
         /**



Mime
View raw message