From 0d0c6bea7229e4daf710a574cd186e7cc0b39f57 Mon Sep 17 00:00:00 2001 From: sshane Date: Wed, 21 Jul 2021 22:45:25 -0700 Subject: [PATCH] networking: fix connected type for multiple APs (#21678) * nm uses ssid to dis/connect so use that for ctype * we don't want to possibly block in the background (from signals) --- selfdrive/ui/qt/offroad/wifiManager.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/offroad/wifiManager.cc b/selfdrive/ui/qt/offroad/wifiManager.cc index 36ff25395..ba5715178 100644 --- a/selfdrive/ui/qt/offroad/wifiManager.cc +++ b/selfdrive/ui/qt/offroad/wifiManager.cc @@ -94,7 +94,8 @@ void WifiManager::refreshNetworks() { unsigned int strength = get_ap_strength(path.path()); SecurityType security = getSecurityType(path.path()); ConnectedType ctype; - if (path.path() != activeAp) { + QString activeSsid = (activeAp != "" && activeAp != "/") ? get_property(activeAp, "Ssid") : ""; + if (ssid != activeSsid) { ctype = ConnectedType::DISCONNECTED; } else { if (ssid == connecting_to_network) {