Fix WifiDirect small logic error

PiperOrigin-RevId: 501309880
This commit is contained in:
hai007
2023-01-11 10:00:28 -08:00
committed by Copybara-Service
parent b246cb57a7
commit 7a9916f726
2 changed files with 2 additions and 2 deletions
@@ -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);
@@ -93,7 +93,7 @@ std::unique_ptr<api::WifiDirectSocket> 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;
}