Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OTA_Shutdown API calls #1538

Merged
merged 4 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions demos/ota/ota_demo_core_http/ota_demo_core_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,9 @@ static void otaAppCallback( OtaJobEvent_t event,
/* Activate the new firmware image. */
OTA_ActivateNewImage();

/* Shutdown OTA Agent. */
OTA_Shutdown( 0 );
/* Shutdown OTA Agent, if it is required that the unsubscribe operations are not
* performed while shutting down please set the second parameter to 0 instead of 1. */
OTA_Shutdown( 0, 1 );

/* Requires manual activation of new image.*/
LogError( ( "New image activation failed." ) );
Expand Down Expand Up @@ -796,8 +797,9 @@ static void otaAppCallback( OtaJobEvent_t event,
* new image downloaded failed.*/
LogError( ( "Self-test failed, shutting down OTA Agent." ) );

/* Shutdown OTA Agent. */
OTA_Shutdown( 0 );
/* Shutdown OTA Agent, if it is required that the unsubscribe operations are not
* performed while shutting down please set the second parameter to 0 instead of 1. */
OTA_Shutdown( 0, 1 );


break;
Expand Down
11 changes: 6 additions & 5 deletions demos/ota/ota_demo_core_mqtt/ota_demo_core_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,9 @@ static void otaAppCallback( OtaJobEvent_t event,
/* Activate the new firmware image. */
OTA_ActivateNewImage();

/* Shutdown OTA Agent. */
OTA_Shutdown( 0 );
/* Shutdown OTA Agent, if it is required that the unsubscribe operations are not
* performed while shutting down please set the second parameter to 0 instead of 1. */
OTA_Shutdown( 0, 1 );

/* Requires manual activation of new image.*/
LogError( ( "New image activation failed." ) );
Expand Down Expand Up @@ -665,9 +666,9 @@ static void otaAppCallback( OtaJobEvent_t event,
* new image downloaded failed.*/
LogError( ( "Self-test failed, shutting down OTA Agent." ) );

/* Shutdown OTA Agent. */
OTA_Shutdown( 0 );

/* Shutdown OTA Agent, if it is required that the unsubscribe operations are not
* performed while shutting down please set the second parameter to 0 instead of 1. */
OTA_Shutdown( 0, 1 );

break;

Expand Down