mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 20:17:04 +03:00
Fix UI reboot to OTA/Recovery button - release
This commit is contained in:
@@ -533,26 +533,20 @@ void http_server_netconn_serve(struct netconn *conn) {
|
||||
ESP_LOGI(TAG, "http_server_netconn_serve: done serving DELETE /connect.json");
|
||||
}
|
||||
else if(strstr(line, "POST /reboot_ota.json ")) {
|
||||
ESP_LOGI(TAG, "http_server_netconn_serve: POST reboot.json");
|
||||
ESP_LOGI(TAG, "http_server_netconn_serve: POST reboot_ota.json");
|
||||
netconn_write(conn, http_ok_json_no_cache_hdr, sizeof(http_ok_json_no_cache_hdr) - 1, NETCONN_NOCOPY); /* 200 ok */
|
||||
netconn_close(conn);
|
||||
netconn_delete(conn);
|
||||
wifi_manager_reboot(OTA);
|
||||
ESP_LOGI(TAG, "http_server_netconn_serve: done serving POST reboot.json");
|
||||
ESP_LOGI(TAG, "http_server_netconn_serve: done serving POST reboot_ota.json");
|
||||
}
|
||||
else if(strstr(line, "POST /reboot.json ")) {
|
||||
ESP_LOGI(TAG, "http_server_netconn_serve: POST reboot.json");
|
||||
netconn_write(conn, http_ok_json_no_cache_hdr, sizeof(http_ok_json_no_cache_hdr) - 1, NETCONN_NOCOPY); /* 200 ok */
|
||||
netconn_close(conn);
|
||||
netconn_delete(conn);
|
||||
wifi_manager_reboot(RESTART);
|
||||
ESP_LOGI(TAG, "http_server_netconn_serve: done serving POST reboot.json");
|
||||
}
|
||||
else if(strstr(line, "POST /recovery.json ")) {
|
||||
ESP_LOGI(TAG, "http_server_netconn_serve: POST recovery.json");
|
||||
netconn_write(conn, http_ok_json_no_cache_hdr, sizeof(http_ok_json_no_cache_hdr) - 1, NETCONN_NOCOPY); /* 200 ok */
|
||||
netconn_close(conn);
|
||||
netconn_delete(conn);
|
||||
wifi_manager_reboot(RECOVERY);
|
||||
ESP_LOGI(TAG, "http_server_netconn_serve: done serving POST recovery.json");
|
||||
}
|
||||
|
||||
@@ -1464,17 +1464,21 @@ void wifi_manager( void * pvParameters ){
|
||||
|
||||
break;
|
||||
case ORDER_RESTART_OTA:
|
||||
ESP_LOGD(TAG, "Calling guided_restart_ota.");
|
||||
guided_restart_ota();
|
||||
break;
|
||||
case ORDER_RESTART_OTA_URL:
|
||||
start_ota(msg.param,false);
|
||||
ESP_LOGD(TAG, "Calling start_ota.");
|
||||
start_ota(msg.param);
|
||||
free(msg.param);
|
||||
break;
|
||||
|
||||
case ORDER_RESTART_RECOVERY:
|
||||
ESP_LOGD(TAG, "Calling guided_factory.");
|
||||
guided_factory();
|
||||
break;
|
||||
case ORDER_RESTART:
|
||||
ESP_LOGD(TAG, "Calling simple_restart.");
|
||||
simple_restart();
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user