Skip to content

Commit

Permalink
OTA: STM32H7 add check on fopen failures
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea Gilardoni <[email protected]>
  • Loading branch information
pennam and andreagilardoni committed Jun 10, 2024
1 parent 4edf9b4 commit 8143741
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ota/implementation/OTASTM32H7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ OTACloudProcessInterface::State STM32H7OTACloudProcess::startOTA() {

decompressed = fopen(_filename.c_str(), "wb");

if(decompressed == nullptr) {
return ErrorOpenUpdateFileFail;
}
// start the download if the setup for ota storage is successful
return OTADefaultCloudProcessInterface::startOTA();
}
Expand Down

0 comments on commit 8143741

Please sign in to comment.