Skip to content

Commit

Permalink
[NXP][platform][common] Fix OTA issue to resume OTA after provider po…
Browse files Browse the repository at this point in the history
…wer off (#33906)

Signed-off-by: Martin Girardot <[email protected]>
  • Loading branch information
Martin-NXP authored and pull[bot] committed Aug 13, 2024
1 parent 3ef5966 commit 9983993
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 1 addition & 5 deletions src/platform/nxp/common/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ CHIP_ERROR OTAImageProcessorImpl::Apply()

CHIP_ERROR OTAImageProcessorImpl::Abort()
{
if (mImageFile == nullptr)
{
ChipLogError(SoftwareUpdate, "Invalid output image file supplied");
return CHIP_ERROR_INTERNAL;
}
DeviceLayer::PlatformMgr().ScheduleWork(HandleAbort, reinterpret_cast<intptr_t>(this));
return CHIP_NO_ERROR;
}
Expand Down Expand Up @@ -308,6 +303,7 @@ void OTAImageProcessorImpl::HandleAbort(intptr_t context)
}

OTA_CancelImage();
OTA_ServiceDeInit();

imageProcessor->ReleaseBlock();
}
Expand Down
2 changes: 0 additions & 2 deletions src/platform/nxp/common/OTAImageProcessorImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface
static void TriggerNewRequestForData(intptr_t context);

void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; }
void SetOTAImageFile(const char * imageFile) { mImageFile = imageFile; }

private:
//////////// Actual handlers for the OTAImageProcessorInterface ///////////////
Expand Down Expand Up @@ -75,7 +74,6 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface
OTADownloader * mDownloader;
OTAImageHeaderParser mHeaderParser;
uint32_t mSoftwareVersion;
const char * mImageFile = nullptr;

/* Buffer used for transaction storage */
uint8_t mPostedOperationsStorage[NB_PENDING_TRANSACTIONS * TRANSACTION_SZ];
Expand Down

0 comments on commit 9983993

Please sign in to comment.