[Libreoffice-commits] .: sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Dec 6 02:38:36 PST 2012
sd/source/ui/remotecontrol/BluetoothServer.cxx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit ec530530b7c4afbc7b521aaf05ac4e3d527fdf7e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Dec 6 11:38:03 2012 +0100
Fix Linux-specific code
Change-Id: I36971b78dcc2fb0ab8570c8b80feb51bf6043e54
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 2559417..6ec590d 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -316,16 +316,17 @@ void SAL_CALL BluetoothServer::run()
socklen_t aRemoteAddrLen = sizeof(aRemoteAddr);
while ( true )
{
- SOCKET socket;
+ int bSocket;
SAL_INFO( "sdremote.bluetooth", "waiting on accept" );
- if ( (socket = accept(aSocket, (sockaddr*) &aRemoteAddr, &aRemoteAddrLen)) == INVALID_SOCKET )
+ if ( (bSocket = accept(aSocket, (sockaddr*) &aRemoteAddr, &aRemoteAddrLen)) < 0 )
{
- SAL_WARN( "sdremote.bluetooth", "accept failed with error " << WSAGetLastError() );
+ int err = errno;
+ SAL_WARN( "sdremote.bluetooth", "accept failed with errno " << err );
close( aSocket );
return;
} else {
SAL_INFO( "sdremote.bluetooth", "connection accepted" );
- Communicator* pCommunicator = new Communicator( new BufferedStreamSocket( socket ) );
+ Communicator* pCommunicator = new Communicator( new BufferedStreamSocket( bSocket ) );
mpCommunicators->push_back( pCommunicator );
pCommunicator->launch();
}
More information about the Libreoffice-commits
mailing list