activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r946997 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/transport/tcp/TcpTransport.cpp main/decaf/net/ssl/SSLContextSpi.cpp test/decaf/net/SocketFactoryTest.cpp
Date Fri, 21 May 2010 13:12:12 GMT
Author: tabish
Date: Fri May 21 13:12:12 2010
New Revision: 946997

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

Fix some errors where pointers to default factories were getting deleted which causes segfaults
later in the tests.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/ssl/SSLContextSpi.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.cpp?rev=946997&r1=946996&r2=946997&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/tcp/TcpTransport.cpp
Fri May 21 13:12:12 2010
@@ -159,7 +159,7 @@ void TcpTransport::connect( const decaf:
 Socket* TcpTransport::createSocket() {
 
     try {
-        std::auto_ptr<SocketFactory> factory( SocketFactory::getDefault() );
+        SocketFactory* factory = SocketFactory::getDefault();
         return factory->createSocket();
     }
     DECAF_CATCH_RETHROW( IOException )

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/ssl/SSLContextSpi.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/ssl/SSLContextSpi.cpp?rev=946997&r1=946996&r2=946997&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/ssl/SSLContextSpi.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/ssl/SSLContextSpi.cpp Fri
May 21 13:12:12 2010
@@ -39,13 +39,14 @@ SSLContextSpi::~SSLContextSpi() {
 ////////////////////////////////////////////////////////////////////////////////
 SSLParameters* SSLContextSpi::providerGetSupportedSSLParameters() {
 
+    SocketFactory* factory = NULL;
+
     std::auto_ptr<SSLParameters> params( new SSLParameters() );
-    std::auto_ptr<SocketFactory> factory;
     std::auto_ptr<SSLSocket> socket;
 
     try{
 
-        factory.reset( SSLSocketFactory::getDefault() );
+        factory = SSLSocketFactory::getDefault();
 
         socket.reset( dynamic_cast<SSLSocket*>( factory->createSocket() ) );
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.cpp?rev=946997&r1=946996&r2=946997&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.cpp Fri
May 21 13:12:12 2010
@@ -140,7 +140,7 @@ void SocketFactoryTest::test()
 
         Thread::sleep( 500 );
 
-        std::auto_ptr<SocketFactory> factory( SocketFactory::getDefault() );
+        SocketFactory* factory = SocketFactory::getDefault();
         std::auto_ptr<Socket> client( factory->createSocket( "127.0.0.1", SocketFactoryTest::DEFAULT_PORT
) );
 
         client->setSoLinger( false, 0 );
@@ -189,7 +189,7 @@ void SocketFactoryTest::testNoDelay()
 
         Thread::sleep( 40 );
 
-        std::auto_ptr<SocketFactory> factory( SocketFactory::getDefault() );
+        SocketFactory* factory = SocketFactory::getDefault();
         std::auto_ptr<Socket> client( factory->createSocket( "127.0.0.1", SocketFactoryTest::DEFAULT_PORT
) );
 
         client->setSoLinger( false, 0 );



Mime
View raw message