From 7a9916f7261edd4945a9eaebd73d35e9bd87315b Mon Sep 17 00:00:00 2001 From: hai007 Date: Wed, 11 Jan 2023 09:58:27 -0800 Subject: [PATCH] Fix WifiDirect small logic error PiperOrigin-RevId: 501309880 --- connections/implementation/wifi_direct_bwu_handler.cc | 2 +- internal/platform/implementation/windows/wifi_direct_medium.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/connections/implementation/wifi_direct_bwu_handler.cc b/connections/implementation/wifi_direct_bwu_handler.cc index 02b0931b..c7ed4317 100644 --- a/connections/implementation/wifi_direct_bwu_handler.cc +++ b/connections/implementation/wifi_direct_bwu_handler.cc @@ -75,7 +75,7 @@ ByteArray WifiDirectBwuHandler::HandleInitializeUpgradedMediumForEndpoint( NEARBY_LOGS(INFO) << "Start WifiDirect GO with SSID: " << ssid << ", Password: " << password << ", Port: " << port - << ", Gateway: " << gateway << "Frequency: " << freq; + << ", Gateway: " << gateway << ", Frequency: " << freq; bool disabling_encryption = (client->GetAdvertisingOptions().strategy == Strategy::kP2pPointToPoint); diff --git a/internal/platform/implementation/windows/wifi_direct_medium.cc b/internal/platform/implementation/windows/wifi_direct_medium.cc index 880bbaf7..3f0ff532 100644 --- a/internal/platform/implementation/windows/wifi_direct_medium.cc +++ b/internal/platform/implementation/windows/wifi_direct_medium.cc @@ -93,7 +93,7 @@ std::unique_ptr WifiDirectMedium::ConnectToService( ipv4_address = std::string(ip_address); } - if (WifiUtils::ValidateIPV4(ipv4_address)) { + if (!WifiUtils::ValidateIPV4(ipv4_address)) { NEARBY_LOGS(ERROR) << "Invalid IP address parameter."; return nullptr; }