Browse Source

wifi: unconditionally erase all settings after fixed index (#2175)

mcspr-patch-1
Max Prokhorov 4 years ago
committed by GitHub
parent
commit
bdedb2b7ae
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 7 deletions
  1. +11
    -7
      code/espurna/wifi.ino

+ 11
- 7
code/espurna/wifi.ino View File

@ -94,13 +94,17 @@ void _wifiConfigure() {
const auto pass = getSetting({"pass", index}, _wifiPass(index));
if (!ssid.length()) {
delSetting({"ssid", index});
delSetting({"pass", index});
delSetting({"ip", index});
delSetting({"gw", index});
delSetting({"mask", index});
delSetting({"dns", index});
continue;
auto current = index;
do {
delSetting({"ssid", index});
delSetting({"pass", index});
delSetting({"ip", index});
delSetting({"gw", index});
delSetting({"mask", index});
delSetting({"dns", index});
} while (++index < WIFI_MAX_NETWORKS);
index = current;
break;
}
bool result = false;


Loading…
Cancel
Save