You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/05/25 23:32:25 UTC

incubator-mynewt-core git commit: imgmgr; check to prevent upload of same image was broken.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 2328ac6bf -> b63403ea0


imgmgr; check to prevent upload of same image was broken.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/b63403ea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/b63403ea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/b63403ea

Branch: refs/heads/develop
Commit: b63403ea0a055eed7b173b871c3377aae1fe96a1
Parents: 2328ac6
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Wed May 25 16:31:30 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Wed May 25 16:31:30 2016 -0700

----------------------------------------------------------------------
 libs/imgmgr/src/imgmgr.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b63403ea/libs/imgmgr/src/imgmgr.c
----------------------------------------------------------------------
diff --git a/libs/imgmgr/src/imgmgr.c b/libs/imgmgr/src/imgmgr.c
index cce4711..23c1dab 100644
--- a/libs/imgmgr/src/imgmgr.c
+++ b/libs/imgmgr/src/imgmgr.c
@@ -397,18 +397,12 @@ imgr_upload(struct nmgr_jbuf *njb)
                      * Not active slot, but image is ok. Use it if there are
                      * no better candidates.
                      */
-                    /*
-                     * XXX reject if trying to upload image which is present
-                     * already.
-                     */
                     best = i;
                 }
                 continue;
             }
-            break;
-        }
-        if (i <= FLASH_AREA_IMAGE_1) {
             best = i;
+            break;
         }
         if (best >= 0) {
             if (imgr_state.upload.fa) {