You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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 <marius.tache@nxp.com>
* [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 <marius.tache@nxp.com>
* [k32w1] Use mShouldNotApply during ExitAction
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [k32w] Update OTA error naming
All OTA errors should be prefixed with CHIP_ERROR.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [k32w] Replace boolean mShouldNotApply with an enum class
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
---------
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
0 commit comments