diff options
| author | Daniel Campora | 2015-09-11 09:34:03 +0200 |
|---|---|---|
| committer | Daniel Campora | 2015-09-16 10:10:15 +0200 |
| commit | 3c4b78e166fa5b9061ffbe5328959ceec7123207 (patch) | |
| tree | 09e434bf8343a272a8b81def15452290dde22067 /cc3200 | |
| parent | 7d6b6f66811b4424f9e353205b4416c4c64d772e (diff) | |
cc3200: Keep overwriting the same image on sequential updates.
Diffstat (limited to 'cc3200')
| -rw-r--r-- | cc3200/ftp/updater.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cc3200/ftp/updater.c b/cc3200/ftp/updater.c index 2f983b16c..2a2d47072 100644 --- a/cc3200/ftp/updater.c +++ b/cc3200/ftp/updater.c @@ -87,8 +87,9 @@ bool updater_check_path (void *path) { if (!sl_FsOpen((unsigned char *)IMG_BOOT_INFO, FS_MODE_OPEN_READ, NULL, &fhandle)) { ASSERT (sizeof(sBootInfo_t) == sl_FsRead(fhandle, 0, (unsigned char *)&sBootInfo, sizeof(sBootInfo_t))); sl_FsClose(fhandle, 0, 0, 0); + // if we still have an image pending for verification, keep overwriting it if ((sBootInfo.Status == IMG_STATUS_CHECK && sBootInfo.ActiveImg == IMG_ACT_UPDATE2) || - sBootInfo.ActiveImg == IMG_ACT_UPDATE1) { + (sBootInfo.ActiveImg == IMG_ACT_UPDATE1 && sBootInfo.Status != IMG_STATUS_CHECK)) { updater_data.path = IMG_UPDATE2; } } |
