activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1342470 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/state/SessionState.cpp
Date Thu, 24 May 2012 22:46:03 GMT
Author: tabish
Date: Thu May 24 22:46:03 2012
New Revision: 1342470

URL: http://svn.apache.org/viewvc?rev=1342470&view=rev
Log:
additional fix for: https://issues.apache.org/jira/browse/AMQCPP-403

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

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/state/SessionState.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/state/SessionState.cpp?rev=1342470&r1=1342469&r2=1342470&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/state/SessionState.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/state/SessionState.cpp Thu
May 24 22:46:03 2012
@@ -75,12 +75,13 @@ void SessionState::addProducer(Pointer<P
 Pointer<ProducerState> SessionState::removeProducer(Pointer<ProducerId> id) {
     Pointer<ProducerState> producerState = producers.remove(id);
     if (producerState != NULL) {
-        if (producerState->getTransactionState() != NULL) {
+        Pointer<TransactionState> transactionState = producerState->getTransactionState();
+        if (transactionState != NULL) {
             // allow the transaction to recreate dependent producer on recovery, we
             // hand off the producer state to the Transaction and NULL the producer's
             // reference to avoid a circular link to it.
-            producerState->getTransactionState()->addProducerState(producerState);
-            producerState->getTransactionState().reset(NULL);
+            producerState->setTransactionState(Pointer<TransactionState>());
+            transactionState->addProducerState(producerState);
         }
     }
 



Mime
View raw message