Fix Bluetooth Ping

This commit is contained in:
2019-01-31 10:38:37 +01:00
parent 367f33aaa3
commit d114c685d0
+1 -1
View File
@@ -32,7 +32,7 @@ bool Functions::Ping(const std::string& macAddress)
memset(&socketAddress, 0, sizeof(socketAddress)); memset(&socketAddress, 0, sizeof(socketAddress));
socketAddress.l2_family = AF_BLUETOOTH; socketAddress.l2_family = AF_BLUETOOTH;
bdaddr_t bdaddr; bdaddr_t bdaddr({{0, 0, 0, 0, 0, 0}});
bacpy(&socketAddress.l2_bdaddr, &bdaddr); bacpy(&socketAddress.l2_bdaddr, &bdaddr);
if (bind(socketDescriptor, reinterpret_cast<struct sockaddr*>(&socketAddress), sizeof(socketAddress)) < 0) if (bind(socketDescriptor, reinterpret_cast<struct sockaddr*>(&socketAddress), sizeof(socketAddress)) < 0)