Skip to content

Commit 0e51f8b

Browse files
nandojvejhedberg
authored andcommitted
lib: updatehub: Add missing do upgrade request call
After a success image download, UpdateHub needs inform MCUboot that must test new image and then, on success, commit this new image. This add missing upgrade request call step and fixes the upgarde flow. Signed-off-by: Gerson Fernando Budke <[email protected]> Signed-off-by: Otavio Salvador <[email protected]> (cherry picked from commit d1e2d34)
1 parent 3e91120 commit 0e51f8b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/updatehub/updatehub.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,12 @@ enum updatehub_response updatehub_update(void)
757757
goto error;
758758
}
759759

760+
if (boot_request_upgrade(BOOT_UPGRADE_TEST)) {
761+
LOG_ERR("Could not reporting downloaded state");
762+
ctx.code_status = UPDATEHUB_INSTALL_ERROR;
763+
goto error;
764+
}
765+
760766
if (report(UPDATEHUB_STATE_INSTALLED) < 0) {
761767
LOG_ERR("Could not reporting installed state");
762768
goto error;

0 commit comments

Comments
 (0)