summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx9
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx2
2 files changed, 4 insertions, 7 deletions
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 5b858edac340..6fd5591cdba1 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -1343,16 +1343,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;
@@ -1376,7 +1374,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 );
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 6d51a4e0d4a5..d653b0a380d6 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -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() );