Skip to content

Commit

Permalink
[OTA-R] Correct the implementation of mProviderRetryCount (#18908)
Browse files Browse the repository at this point in the history
* Implemented fix for Issue #18824.

* - Remove debug code.
- scripts/helpers/restyle-diff.sh

* Code review changes.

* Code review changes.

- Remove reset from DefaultOTARequestorDriver::UpdateDownloaded()
  • Loading branch information
isiu-apple authored and pull[bot] committed Jun 23, 2023
1 parent 1b55ed7 commit 1715826
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/ota-requestor-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,15 @@ void CustomOTARequestorDriver::UpdateDownloaded()
{
if (gAutoApplyImage)
{
// Let the default driver take further action to apply the image
// Let the default driver take further action to apply the image.
// All member variables will be implicitly reset upon loading into the new image.
DefaultOTARequestorDriver::UpdateDownloaded();
}
else
{
// Download complete but we're not going to apply image, so reset provider retry counter.
mProviderRetryCount = 0;

// Reset to put the state back to idle to allow the next OTA update to occur
gRequestorCore.Reset();
}
Expand Down
1 change: 0 additions & 1 deletion src/app/clusters/ota-requestor/DefaultOTARequestor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@ void DefaultOTARequestor::OnDownloadStateChanged(OTADownloader::State state, OTA
{
RecordErrorUpdateState(CHIP_ERROR_CONNECTION_ABORTED, reason);
}

break;
default:
break;
Expand Down

0 comments on commit 1715826

Please sign in to comment.