Skip to content

Commit b05165e

Browse files
authored
[NXP][platform][common] Fix OTA issue to resume OTA after provider power off (#33906)
Signed-off-by: Martin Girardot <martin.girardot@nxp.com>
1 parent 1d4ac45 commit b05165e

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/platform/nxp/common/OTAImageProcessorImpl.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ CHIP_ERROR OTAImageProcessorImpl::Apply()
4444

4545
CHIP_ERROR OTAImageProcessorImpl::Abort()
4646
{
47-
if (mImageFile == nullptr)
48-
{
49-
ChipLogError(SoftwareUpdate, "Invalid output image file supplied");
50-
return CHIP_ERROR_INTERNAL;
51-
}
5247
DeviceLayer::PlatformMgr().ScheduleWork(HandleAbort, reinterpret_cast<intptr_t>(this));
5348
return CHIP_NO_ERROR;
5449
}
@@ -308,6 +303,7 @@ void OTAImageProcessorImpl::HandleAbort(intptr_t context)
308303
}
309304

310305
OTA_CancelImage();
306+
OTA_ServiceDeInit();
311307

312308
imageProcessor->ReleaseBlock();
313309
}

src/platform/nxp/common/OTAImageProcessorImpl.h

-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface
4747
static void TriggerNewRequestForData(intptr_t context);
4848

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

5251
private:
5352
//////////// Actual handlers for the OTAImageProcessorInterface ///////////////
@@ -75,7 +74,6 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface
7574
OTADownloader * mDownloader;
7675
OTAImageHeaderParser mHeaderParser;
7776
uint32_t mSoftwareVersion;
78-
const char * mImageFile = nullptr;
7977

8078
/* Buffer used for transaction storage */
8179
uint8_t mPostedOperationsStorage[NB_PENDING_TRANSACTIONS * TRANSACTION_SZ];

0 commit comments

Comments
 (0)