Skip to content

Commit 3c4b78e

Browse files
author
Daniel Campora
committed
cc3200: Keep overwriting the same image on sequential updates.
1 parent 7d6b6f6 commit 3c4b78e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cc3200/ftp/updater.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ bool updater_check_path (void *path) {
8787
if (!sl_FsOpen((unsigned char *)IMG_BOOT_INFO, FS_MODE_OPEN_READ, NULL, &fhandle)) {
8888
ASSERT (sizeof(sBootInfo_t) == sl_FsRead(fhandle, 0, (unsigned char *)&sBootInfo, sizeof(sBootInfo_t)));
8989
sl_FsClose(fhandle, 0, 0, 0);
90+
// if we still have an image pending for verification, keep overwriting it
9091
if ((sBootInfo.Status == IMG_STATUS_CHECK && sBootInfo.ActiveImg == IMG_ACT_UPDATE2) ||
91-
sBootInfo.ActiveImg == IMG_ACT_UPDATE1) {
92+
(sBootInfo.ActiveImg == IMG_ACT_UPDATE1 && sBootInfo.Status != IMG_STATUS_CHECK)) {
9293
updater_data.path = IMG_UPDATE2;
9394
}
9495
}

0 commit comments

Comments
 (0)