1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-10-19 21:09:48 +03:00

Bugfix/persistentchecks (#3798)

* persistent check fixes

fixes assumtions that persistent matches current configs, and prevents changes when such conditions exist

* oops

* fix code compliance block scoping
This commit is contained in:
Shawn A
2018-03-08 20:55:09 -06:00
committed by Develo
parent ac546acb80
commit 0643d6e7ab
3 changed files with 23 additions and 7 deletions

View File

@@ -138,9 +138,15 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
conf.bssid_set = 0;
}
struct station_config current_conf;
wifi_station_get_config(&current_conf);
if(sta_config_equal(current_conf, conf)) {
struct station_config conf_compare;
if(WiFi._persistent){
wifi_station_get_config_default(&conf_compare);
}
else {
wifi_station_get_config(&conf_compare);
}
if(sta_config_equal(conf_compare, conf)) {
DEBUGV("sta config unchanged");
}
else {