Set Station parameters if defined

To allow changes both in STA or AP settings, they should be active.
Opmode is set to 3 few lines above, so changes allowed in both STA and
AP.
Because the above opmode set, this “if” is useless.
pull/84/head
KatAst 9 years ago
parent 6f4cead199
commit c8aab7611b
  1. 6
      esp-link/cgiwifi.c

@ -859,9 +859,9 @@ void ICACHE_FLASH_ATTR wifiInit() {
DBG("Wifi init, mode=%s\n",wifiMode[x]);
// STATION parameters only on a full flash, because default opmode is 2
// STATION parameters
#if defined(STA_SSID) && defined(STA_PASS)
if( x == 2 ){
// Set parameters
if (os_strlen((char*)stconf.ssid) == 0 && os_strlen((char*)stconf.password) == 0) {
os_strncpy((char*)stconf.ssid, VERS_STR(STA_SSID), 32);
@ -873,7 +873,7 @@ void ICACHE_FLASH_ATTR wifiInit() {
stconf.bssid_set = 0;
wifi_station_set_config(&stconf);
}
}
#endif
// Change SOFT_AP settings if defined

Loading…
Cancel
Save