summaryrefslogtreecommitdiffstats
path: root/io/source/acceptor
diff options
context:
space:
mode:
Diffstat (limited to 'io/source/acceptor')
-rw-r--r--io/source/acceptor/acc_pipe.cxx5
-rw-r--r--io/source/acceptor/acc_socket.cxx5
2 files changed, 6 insertions, 4 deletions
diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx
index 69f1cad79206..0718834e3115 100644
--- a/io/source/acceptor/acc_pipe.cxx
+++ b/io/source/acceptor/acc_pipe.cxx
@@ -26,6 +26,7 @@
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <cppuhelper/implbase.hxx>
+#include <rtl/ref.hxx>
using namespace ::osl;
using namespace ::cppu;
@@ -151,7 +152,7 @@ namespace io_acceptor
OUString error = "io.acceptor: pipe already closed" + m_sPipeName;
throw ConnectionSetupException( error );
}
- std::unique_ptr<PipeConnection> pConn(new PipeConnection( m_sConnectionDescription ));
+ rtl::Reference<PipeConnection> pConn(new PipeConnection( m_sConnectionDescription ));
oslPipeError status = pipe.accept( pConn->m_pipe );
@@ -162,7 +163,7 @@ namespace io_acceptor
}
else if( osl_Pipe_E_None == status )
{
- return Reference < XConnection > ( static_cast<XConnection *>(pConn.release()) );
+ return pConn.get();
}
else
{
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index 9700cd566bb8..57c8a179885b 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -23,6 +23,7 @@
#include <osl/mutex.hxx>
#include <rtl/ustrbuf.hxx>
+#include <rtl/ref.hxx>
#include <com/sun/star/connection/XConnection.hpp>
#include <com/sun/star/connection/XConnectionBroadcaster.hpp>
#include <com/sun/star/connection/ConnectionSetupException.hpp>
@@ -316,7 +317,7 @@ namespace io_acceptor {
Reference< XConnection > SocketAcceptor::accept( )
{
- std::unique_ptr<SocketConnection> pConn(new SocketConnection( m_sConnectionDescription ));
+ rtl::Reference<SocketConnection> pConn(new SocketConnection( m_sConnectionDescription ));
if( m_socket.acceptConnection( pConn->m_socket )!= osl_Socket_Ok )
{
@@ -342,7 +343,7 @@ namespace io_acceptor {
sizeof( nTcpNoDelay ) , osl_Socket_LevelTcp );
}
- return Reference < XConnection > ( static_cast<XConnection *>(pConn.release()) );
+ return pConn.get();
}
void SocketAcceptor::stopAccepting()