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)
pull/21680/head
sshane 4 years ago committed by GitHub
parent 973e016fa7
commit 0d0c6bea72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/ui/qt/offroad/wifiManager.cc

@ -94,7 +94,8 @@ void WifiManager::refreshNetworks() {
unsigned int strength = get_ap_strength(path.path()); unsigned int strength = get_ap_strength(path.path());
SecurityType security = getSecurityType(path.path()); SecurityType security = getSecurityType(path.path());
ConnectedType ctype; ConnectedType ctype;
if (path.path() != activeAp) { QString activeSsid = (activeAp != "" && activeAp != "/") ? get_property(activeAp, "Ssid") : "";
if (ssid != activeSsid) {
ctype = ConnectedType::DISCONNECTED; ctype = ConnectedType::DISCONNECTED;
} else { } else {
if (ssid == connecting_to_network) { if (ssid == connecting_to_network) {

Loading…
Cancel
Save