NordicSemiconductor / IOS-nRF-Connect-Device-Manager

A mobile management library for devices supporting nRF Connect Device Manager.
https://www.nordicsemi.com/Software-and-tools/Software/nRF-Connect-SDK
Apache License 2.0
97 stars 41 forks source link

Fix for Confirmation-Loop Bug when Starting Multi-Image DFU with unsorted Image(s) #53

Closed dinesharjani closed 2 years ago

dinesharjani commented 2 years ago

Bug was caused by starting a muilti-image DFU Upload wherein the images were in the wrong order. The for-loop inside confirmationCallback expects self.image[j] to match j, otherwise we might mark the incorrect image as confirmed but skip over the one that is not confirmed in the loop itself (guard statement checking our own properties whether an image is confirmed). This extends further into test and validate stages, where we also made some changes to the code.