Skip to content

Commit

Permalink
Reset the downloadedBytes and totalFileBytes in the OTAImageProgress …
Browse files Browse the repository at this point in the history
…params to 0 when we prepare for download for BDX (project-chip#28309)
  • Loading branch information
nivi-apple authored Jul 27, 2023
1 parent 386cc5e commit 426be96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platform/Linux/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context)

unlink(imageProcessor->mImageFile);

imageProcessor->mParams.downloadedBytes = 0;
imageProcessor->mParams.totalFileBytes = 0;
imageProcessor->mHeaderParser.Init();
imageProcessor->mOfs.open(imageProcessor->mImageFile, std::ofstream::out | std::ofstream::ate | std::ofstream::app);
if (!imageProcessor->mOfs.good())
Expand Down

0 comments on commit 426be96

Please sign in to comment.