Kaydet (Commit) ec530530 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix Linux-specific code

Change-Id: I36971b78dcc2fb0ab8570c8b80feb51bf6043e54
üst 1d3a86cf
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment