Skip to content

Commit

Permalink
[Linux] Do not filter WiFi scan results if the ssid used for filterin…
Browse files Browse the repository at this point in the history
…g is empty (#20312)
  • Loading branch information
vivien-apple authored and pull[bot] committed Jul 6, 2022
1 parent cd4d2e7 commit 1126636
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/platform/Linux/ConnectivityManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1706,10 +1706,16 @@ void ConnectivityManagerImpl::_OnWpaInterfaceScanDone(GObject * source_object, G
for (const gchar * bssPath = (bsss != nullptr ? *bsss : nullptr); bssPath != nullptr; bssPath = *(++bsss))
{
WiFiScanResponse network;
if (_GetBssInfo(bssPath, network) && network.ssidLen == sInterestedSSIDLen &&
memcmp(network.ssid, sInterestedSSID, sInterestedSSIDLen) == 0)
if (_GetBssInfo(bssPath, network))
{
networkScanned->push_back(network);
if (sInterestedSSIDLen == 0)
{
networkScanned->push_back(network);
}
else if (network.ssidLen == sInterestedSSIDLen && memcmp(network.ssid, sInterestedSSID, sInterestedSSIDLen) == 0)
{
networkScanned->push_back(network);
}
}
}

Expand Down

0 comments on commit 1126636

Please sign in to comment.