summaryrefslogtreecommitdiff
path: root/sd/source/ui/remotecontrol
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2013-02-10 10:28:08 +0100
committerFridrich Strba <fridrich@documentfoundation.org>2013-03-07 12:54:43 +0000
commitd1273b428e60a3bd20fe57400e21dbb605879fb3 (patch)
tree09e7db8e28c94b87f1a822c2a9b8de8fdc8a9f13 /sd/source/ui/remotecontrol
parent70a9c8cd09c12ba67071ec14d16d5a5a8add7f2c (diff)
sdremote : Remove pointer to deleted RemoteServer on error case
Change-Id: Id0fcbf46c907b94f1233acfbd84036b85ca388a3 Reviewed-on: https://gerrit.libreoffice.org/2081 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sd/source/ui/remotecontrol')
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 561dac149cb6..5b53b87d4494 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -81,18 +81,21 @@ void RemoteServer::execute()
if (!xContext.is() || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
{
SAL_INFO("sdremote", "not in experimental mode, disabling TCP server");
+ spServer = NULL;
return;
}
osl::SocketAddr aAddr( "0", PORT );
if ( !mSocket.bind( aAddr ) )
{
SAL_WARN( "sdremote", "bind failed" << mSocket.getErrorAsString() );
+ spServer = NULL;
return;
}
if ( !mSocket.listen(3) )
{
SAL_WARN( "sdremote", "listen failed" << mSocket.getErrorAsString() );
+ spServer = NULL;
return;
}
while ( true )
@@ -102,6 +105,7 @@ void RemoteServer::execute()
if ( mSocket.acceptConnection( aSocket ) == osl_Socket_Error )
{
SAL_WARN( "sdremote", "accept failed" << mSocket.getErrorAsString() );
+ spServer = NULL;
return; // Closed, or other issue.
}
BufferedStreamSocket *pSocket = new BufferedStreamSocket( aSocket);