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 2008/02/26 01:36:33 UTC

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

Author: tabish
Date: Mon Feb 25 16:36:21 2008
New Revision: 631049

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

cleaning up the double delete of producer info in the create producer method.

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

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.cpp?rev=631049&r1=631048&r2=631049&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.cpp Mon Feb 25 16:36:21 2008
@@ -86,7 +86,7 @@
     synchronized( &mutex ) {
         this->state = CONNECTION_STATE_DISCONNECTED;
     }
-    
+
     this->exceptionListener = NULL;
     this->messageListener = NULL;
     this->brokerInfo = NULL;
@@ -146,7 +146,7 @@
                     __FILE__, __LINE__,
                     "OpenWireConnector::start - already started" );
             }
-            
+
             // Start the transport - this establishes the socket.
             transport->start();
 
@@ -172,7 +172,7 @@
 
             // Send the disconnect message to the broker.
             disconnect();
-            
+
             // Close the transport now that we've sent the last messages..
             transport->close();
         }
@@ -208,7 +208,7 @@
         commands::ConnectionId* connectionId = new commands::ConnectionId();
         connectionId->setValue( UUID::randomUUID().toString() );
         connectionInfo.setConnectionId( connectionId );
-                    
+
         // Now we ping the broker and see if we get an ack / nack
         Response* response = syncRequest( &connectionInfo );
 
@@ -698,26 +698,18 @@
 
     } catch( ConnectorException& ex ) {
         delete producer;
-        delete producerInfo;
-
         ex.setMark( __FILE__, __LINE__ );
         throw ex;
     } catch( Exception& ex ) {
         delete producer;
-        delete producerInfo;
-
         ex.setMark( __FILE__, __LINE__ );
         throw OpenWireConnectorException( ex );
     } catch( std::exception& ex ) {
         delete producer;
-        delete producerInfo;
-
         throw OpenWireConnectorException( __FILE__, __LINE__,
             ex.what() );
     } catch( ... ) {
         delete producer;
-        delete producerInfo;
-
         throw OpenWireConnectorException( __FILE__, __LINE__,
             "caught unknown exception" );
     }
@@ -1403,12 +1395,12 @@
         if( state == CONNECTION_STATE_DISCONNECTED ){
             return;
         }
-                    
+
         synchronized( &mutex ) {
             // Mark the fact that we are in an error state
             state = CONNECTION_STATE_ERROR;
         }
-                    
+
         // Inform the user of the error.
         fire( ex );
     }
@@ -1434,7 +1426,7 @@
     throw ( ConnectorException ) {
 
     try {
-                    
+
         Response* response = transport->request( command );
 
         commands::ExceptionResponse* exceptionResponse =