Fix remote static bluetooth mac address serialization bug

PiperOrigin-RevId: 452536487
This commit is contained in:
aaronyujiaze
2022-06-02 07:48:03 -07:00
committed by Copybara-Service
parent 6d8d04a9f7
commit 11558b453c
+3 -2
View File
@@ -16,6 +16,7 @@
#include "absl/strings/str_format.h"
#include "connections/core.h"
#include "internal/platform/bluetooth_utils.h"
namespace location::nearby::windows {
@@ -189,8 +190,8 @@ void RequestConnection(connections::Core *pCore, const char *endpoint_id,
connection_options.low_power = connection_options_w.low_power;
if (connection_options_w.remote_bluetooth_mac_address) {
connection_options.remote_bluetooth_mac_address =
ByteArray(connection_options_w.remote_bluetooth_mac_address,
strlen(connection_options_w.remote_bluetooth_mac_address));
BluetoothUtils::FromString(
connection_options_w.remote_bluetooth_mac_address);
}
if (connection_options_w.strategy == StrategyW::kNone)
connection_options.strategy = connections::Strategy::kNone;