From ac9d6b1c5533977bb77d4c4a45db409f6bbd58ff Mon Sep 17 00:00:00 2001 From: Guogang Li Date: Wed, 19 Apr 2023 18:23:07 -0700 Subject: [PATCH] fixed the bssid format issue PiperOrigin-RevId: 525606245 --- internal/platform/implementation/windows/wifi_medium.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/platform/implementation/windows/wifi_medium.cc b/internal/platform/implementation/windows/wifi_medium.cc index 0ca62ec8..f35bf8e5 100644 --- a/internal/platform/implementation/windows/wifi_medium.cc +++ b/internal/platform/implementation/windows/wifi_medium.cc @@ -192,7 +192,7 @@ api::WifiInformation& WifiMedium::GetInformation() { p_connect_info->wlanAssociationAttributes.dot11Bssid), kMacAddrLen); wifi_information_.bssid = absl::StrFormat( - "%2llx:%2llx:%2llx:%2llx:%2llx:%2llx", str_tmp[0], str_tmp[1], + "%02llx:%02llx:%02llx:%02llx:%02llx:%02llx", str_tmp[0], str_tmp[1], str_tmp[2], str_tmp[3], str_tmp[4], str_tmp[5]); NEARBY_LOGS(INFO) << "wifi bssid is: " << wifi_information_.bssid; } @@ -241,7 +241,7 @@ std::string WifiMedium::InternalGetWifiIpAddress() { winrt::to_string(profile_details.GetConnectedSsid())) { NEARBY_LOGS(INFO) << "SSID of this IP matches with this WiFi interface's SSID:" - << wifi_information_.ssid << ", return this IP"; + << wifi_information_.ssid << ", return this IP: " << ipv4_s; return ipv4_s; } }