mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 19:47:02 +03:00
Fix: don't delete AP details when connect fails.
This commit is contained in:
@@ -298,7 +298,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<h2>Firmware URL:</h2>
|
||||
<textarea id="fwurl" maxlength="120"></textarea>
|
||||
<textarea id="fwurl" maxlength="350"></textarea>
|
||||
<div class="buttons">
|
||||
<input type="button" id="flash" class="btn btn-danger" value="Flash!" /><span id="flash-status"></span>
|
||||
</div>
|
||||
|
||||
@@ -1279,12 +1279,12 @@ void wifi_manager( void * pvParameters ){
|
||||
}
|
||||
|
||||
/* erase configuration */
|
||||
// if(wifi_manager_config_sta){
|
||||
// ESP_LOGI(TAG, "Erasing WiFi Configuration.");
|
||||
// memset(wifi_manager_config_sta, 0x00, sizeof(wifi_config_t));
|
||||
// /* save NVS memory */
|
||||
// wifi_manager_save_sta_config();
|
||||
// }
|
||||
if(wifi_manager_config_sta){
|
||||
ESP_LOGI(TAG, "Erasing WiFi Configuration.");
|
||||
memset(wifi_manager_config_sta, 0x00, sizeof(wifi_config_t));
|
||||
/* save NVS memory */
|
||||
wifi_manager_save_sta_config();
|
||||
}
|
||||
/* start SoftAP */
|
||||
ESP_LOGD(TAG, "Disconnect processing complete. Ordering an AP start.");
|
||||
wifi_manager_send_message(ORDER_START_AP, NULL);
|
||||
@@ -1311,12 +1311,12 @@ void wifi_manager( void * pvParameters ){
|
||||
xEventGroupClearBits(wifi_manager_event_group, WIFI_MANAGER_REQUEST_RESTORE_STA_BIT);
|
||||
|
||||
/* erase configuration that could not be used to connect */
|
||||
if(wifi_manager_config_sta){
|
||||
ESP_LOGW(TAG, "Erasing wifi manager config.");
|
||||
memset(wifi_manager_config_sta, 0x00, sizeof(wifi_config_t));
|
||||
/* save empty connection info in NVS memory */
|
||||
wifi_manager_save_sta_config();
|
||||
}
|
||||
// if(wifi_manager_config_sta){
|
||||
// ESP_LOGW(TAG, "Erasing wifi manager config.");
|
||||
// memset(wifi_manager_config_sta, 0x00, sizeof(wifi_config_t));
|
||||
// /* save empty connection info in NVS memory */
|
||||
// wifi_manager_save_sta_config();
|
||||
// }
|
||||
ESP_LOGD(TAG, "Issuing ORDER_START_AP to trigger AP start.");
|
||||
/* start SoftAP */
|
||||
wifi_manager_send_message(ORDER_START_AP, NULL);
|
||||
|
||||
Reference in New Issue
Block a user