From eceb423cfe4a701c1ac9e16e10226f4025c375f9 Mon Sep 17 00:00:00 2001 From: ActoryOu Date: Fri, 22 Mar 2024 17:52:53 +0800 Subject: [PATCH] Notify other tasks that OTA is stopped when fail to activate new image. --- main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c b/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c index 05d610b..4ce79b6 100644 --- a/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c +++ b/main/demo_tasks/ota_over_mqtt_demo/ota_over_mqtt_demo.c @@ -535,6 +535,10 @@ static void prvOtaAppCallback( OtaJobEvent_t event, * performed while shutting down please set the second parameter to 0 instead of 1. */ OTA_Shutdown( 0, 1 ); + /* Notify the coreMQTT-Agent network manager that an OTA job has been terminated. + * Please note that due to a critical issue in the OTA PAL (Platform Abstraction Layer), + * the OTA service has been shut down and will not function properly after this point. */ + xCoreMqttAgentManagerPost( CORE_MQTT_AGENT_OTA_STOPPED_EVENT ); break;