mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Fix WifiDirect small logic error
PiperOrigin-RevId: 501309880
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user