Commit d1e2d345 authored by Gerson Fernando Budke's avatar Gerson Fernando Budke Committed by Jukka Rissanen
Browse files

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: default avatarGerson Fernando Budke <gerson.budke@ossystems.com.br>
Signed-off-by: default avatarOtavio Salvador <otavio@ossystems.com.br>
parent 1128eab3
Loading
Loading
Loading
Loading
+6 −0
Changes for lib/updatehub/updatehub.c: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -757,6 +757,12 @@ enum updatehub_response updatehub_update(void)
		goto error;
	}

	if (boot_request_upgrade(BOOT_UPGRADE_TEST)) {
		LOG_ERR("Could not reporting downloaded state");
		ctx.code_status = UPDATEHUB_INSTALL_ERROR;
		goto error;
	}

	if (report(UPDATEHUB_STATE_INSTALLED) < 0) {
		LOG_ERR("Could not reporting installed state");
		goto error;