activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1342464 - /activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/SessionState.cpp
Date Thu, 24 May 2012 22:31:15 GMT
Author: tabish
Date: Thu May 24 22:31:15 2012
New Revision: 1342464

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

Modified:
    activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/SessionState.cpp

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/SessionState.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/SessionState.cpp?rev=1342464&r1=1342463&r2=1342464&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/SessionState.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/state/SessionState.cpp
Thu May 24 22:31:15 2012
@@ -67,14 +67,15 @@ void SessionState::addProducer( const Po
 ////////////////////////////////////////////////////////////////////////////////
 Pointer<ProducerState> SessionState::removeProducer( const Pointer<ProducerId>&
id ) {
 
-    Pointer<ProducerState> producerState = producers.remove( id );
-    if( producerState != NULL ) {
-        if( producerState->getTransactionState() != NULL ) {
-            // allow the transaction to recreate dependent producer on recovery
-            producerState->getTransactionState()->addProducerState( producerState );
-            producerState->getTransactionState().reset(NULL);
-        }
-    }
+    Pointer<ProducerState> producerState = producers.remove(id);
+	if (producerState != NULL) {
+		Pointer<TransactionState> txState = producerState->getTransactionState();
+		if (txState != NULL) {
+			producerState->setTransactionState(Pointer<TransactionState>());
+			// allow the transaction to recreate dependent producer on recovery
+			producerState->getTransactionState()->addProducerState(producerState);
+		}
+	}
 
     return producerState;
 }



Mime
View raw message