Added a check for a failed process job message.
This change adds a check that if the prvProcessOTAJobMsg returns NULL
and the image state is still unknown, the OTA job is aborted with
a job parse error
@@ -1481,6 +1481,13 @@ static void prvOTAUpdateTask( void * pvUnused )
( void ) prvResetDevice(); /* Ignore return code since there's nothing we can do if we can't force reset. */
}
}
+ else if (OTA_GetImageState() == eOTA_ImageState_Unknown)
+ {
+ /* If the job context returned NULL and the image state is unknown, then an error
+ * occurred parsing the OTA job message. Abort the OTA job with a parse error.
+ */
+ ( void ) prvSetImageStateWithReason( eOTA_ImageState_Aborted, kOTA_Err_JobParserError );
+ }
}
else
{
