Kaydet (Commit) fb5f1367 authored tarafından Rostislav Kondratenko's avatar Rostislav Kondratenko Kaydeden (comit) Michael Stahl

Fixing initialization code for Bluetooth and IP Server for Impress.

Change-Id: Icc385fb760b8a5ff337f58dc95ba3c3f86805eaa
Reviewed-on: https://gerrit.libreoffice.org/50108Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 8e1bb35e
......@@ -1332,16 +1332,14 @@ void SAL_CALL BluetoothServer::run()
return;
}
SOCKADDR aName;
SOCKADDR_BTH aName;
int aNameSize = sizeof(aName);
getsockname( aSocket, &aName, &aNameSize ); // Retrieve the local address and port
getsockname( aSocket, reinterpret_cast<SOCKADDR*>(&aName), &aNameSize ); // Retrieve the local address and port
CSADDR_INFO aAddrInfo;
memset( &aAddrInfo, 0, sizeof(aAddrInfo) );
aAddrInfo.LocalAddr.lpSockaddr = &aName;
aAddrInfo.LocalAddr.lpSockaddr = reinterpret_cast<SOCKADDR*>(&aName);
aAddrInfo.LocalAddr.iSockaddrLength = sizeof( SOCKADDR_BTH );
aAddrInfo.RemoteAddr.lpSockaddr = &aName;
aAddrInfo.RemoteAddr.iSockaddrLength = sizeof( SOCKADDR_BTH );
aAddrInfo.iSocketType = SOCK_STREAM;
aAddrInfo.iProtocol = BTHPROTO_RFCOMM;
......@@ -1365,7 +1363,6 @@ void SAL_CALL BluetoothServer::run()
aRecord.dwNameSpace = NS_BTH;
aRecord.dwNumberOfCsAddrs = 1;
aRecord.lpcsaBuffer = &aAddrInfo;
if (WSASetServiceW( &aRecord, RNRSERVICE_REGISTER, 0 ) == SOCKET_ERROR)
{
closesocket( aSocket );
......
......@@ -83,7 +83,7 @@ void RemoteServer::execute()
spServer = nullptr;
return;
}
osl::SocketAddr aAddr( "0", PORT );
osl::SocketAddr aAddr( "0.0.0.0", PORT );
if ( !mSocket.bind( aAddr ) )
{
SAL_WARN( "sdremote", "bind failed" << mSocket.getErrorAsString() );
......
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