You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/03/29 22:46:28 UTC

svn commit: r523837 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp

Author: tabish
Date: Thu Mar 29 13:46:27 2007
New Revision: 523837

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

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=523837&r1=523836&r2=523837
==============================================================================
--- 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 Thu Mar 29 13:46:27 2007
@@ -875,6 +875,11 @@
                 "Message is not a valid Open Wire type.");
         }
 
+        // Clear any old data that might be in the message object
+        delete amqMessage->getMessageId();
+        delete amqMessage->getProducerId();
+        delete amqMessage->getTransactionId();
+
         // Always assign the message ID, regardless of the disable
         // flag.  Not adding a message ID will cause an NPE at the broker.
         commands::MessageId* id = new commands::MessageId();
@@ -1012,7 +1017,7 @@
                     "Transacted Session, has no Transaction Info.");
             }
 
-            const commands::TransactionId* transactionId = 
+            const commands::TransactionId* transactionId =
                 dynamic_cast<const commands::TransactionId*>(
                     transactionInfo->getTransactionInfo()->getTransactionId() );