-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[K32W] Fix apply action corner case in OTATlvProcessor interface (#33214
) * [k32w] Add mShouldNotApply flag in OTATlvProcessor interface OTATlvProcessor::ApplyAction now has a default implementation, but derived classes are still able to overwrite this. The flag is used by the default ApplyAction implementation. If something goes wrong during ExitAction of the TLV processor, then mShouldNotApply should be set to true and the image processor should abort. In this case, the BDX transfer was already finished and calling CancelImageUpdate will not abort the transfer, hence the device will reboot even though it should not have. If ApplyAction fails during HandleApply, then the process will be aborted. Signed-off-by: marius-alex-tache <[email protected]> * [k32w0] Use mShouldNotApply flag in ExitAction During ExitAction, set mShouldNotApply to true if an error occurs. This ensures that the OTA will be aborted and the device does not reboot. Also remove the ApplyAction override, since the default implementation is enough. Signed-off-by: marius-alex-tache <[email protected]> * [k32w1] Use mShouldNotApply during ExitAction Signed-off-by: marius-alex-tache <[email protected]> * [k32w] Update OTA error naming All OTA errors should be prefixed with CHIP_ERROR. Signed-off-by: marius-alex-tache <[email protected]> * [k32w] Replace boolean mShouldNotApply with an enum class Signed-off-by: marius-alex-tache <[email protected]> --------- Signed-off-by: marius-alex-tache <[email protected]>
- Loading branch information
1 parent
8e77ba2
commit 46f8df2
Showing
6 changed files
with
79 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters