remove connecting when forgetting

pull/29378/head
Shane Smiskol 2 years ago
parent a220b518fa
commit 671db0b5e7
  1. 3
      selfdrive/ui/qt/offroad/wifiManager.cc

@ -162,8 +162,8 @@ SecurityType WifiManager::getSecurityType(const QVariantMap &properties) {
} }
void WifiManager::connect(const Network &n, const QString &password, const QString &username) { void WifiManager::connect(const Network &n, const QString &password, const QString &username) {
setCurrentConnecting(n.ssid);
forgetConnection(n.ssid); // Clear all connections that may already exist to the network we are connecting forgetConnection(n.ssid); // Clear all connections that may already exist to the network we are connecting
setCurrentConnecting(n.ssid);
Connection connection; Connection connection;
connection["connection"]["type"] = "802-11-wireless"; connection["connection"]["type"] = "802-11-wireless";
connection["connection"]["uuid"] = QUuid::createUuid().toString().remove('{').remove('}'); connection["connection"]["uuid"] = QUuid::createUuid().toString().remove('{').remove('}');
@ -225,6 +225,7 @@ void WifiManager::forgetConnection(const QString &ssid) {
if (!path.path().isEmpty()) { if (!path.path().isEmpty()) {
call(path.path(), NM_DBUS_INTERFACE_SETTINGS_CONNECTION, "Delete"); call(path.path(), NM_DBUS_INTERFACE_SETTINGS_CONNECTION, "Delete");
} }
setCurrentConnecting("");
} }
uint WifiManager::getAdapterType(const QDBusObjectPath &path) { uint WifiManager::getAdapterType(const QDBusObjectPath &path) {

Loading…
Cancel
Save