Skip to content

Commit

Permalink
[nrfconnect] Clear OTA image download offset (#19971)
Browse files Browse the repository at this point in the history
The number of already downloaded bytes of an OTA image
was not cleared at the beginning of the OTA update.
As a result, if an OTA image transfer was interrupted, the
next attempt to download the image would fail.

Signed-off-by: Damian Krolik <[email protected]>
  • Loading branch information
Damian-Nordic authored and pull[bot] committed Oct 11, 2023
1 parent ccf8061 commit 4c9b204
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/platform/nrfconnect/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ CHIP_ERROR OTAImageProcessorImpl::PrepareDownload()
CHIP_ERROR OTAImageProcessorImpl::PrepareDownloadImpl()
{
mHeaderParser.Init();
mParams = {};
ReturnErrorOnFailure(System::MapErrorZephyr(dfu_target_mcuboot_set_buf(mBuffer, sizeof(mBuffer))));
ReturnErrorOnFailure(System::MapErrorZephyr(dfu_multi_image_init(mBuffer, sizeof(mBuffer))));

Expand Down

0 comments on commit 4c9b204

Please sign in to comment.