Skip to content

Commit

Permalink
update verify active job logic (#183)
Browse files Browse the repository at this point in the history
* update verify active job logic

* Uncrustify ota.c
  • Loading branch information
pvyawaha authored Feb 25, 2021
1 parent 6debf1a commit dc12c6a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion source/ota.c
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,17 @@ static OtaJobParseErr_t verifyActiveJobStatus( OtaFileContext_t * pFileContext,

/* Abort the current job. */
( void ) otaAgent.pOtaInterface->pal.setPlatformImageState( &( otaAgent.fileContext ), OtaImageStateAborted );
( void ) otaClose( &( otaAgent.fileContext ) );

/*
* Abort any active file access and release the file resource, if needed.
*/
( void ) otaAgent.pOtaInterface->pal.abort( pFileContext );

/* Cleanup related to selected protocol. */
if( otaDataInterface.cleanup != NULL )
{
( void ) otaDataInterface.cleanup( &otaAgent );
}

/* Set new active job name. */
( void ) memcpy( otaAgent.pActiveJobName, pFileContext->pJobName, strlen( ( const char * ) pFileContext->pJobName ) );
Expand Down

0 comments on commit dc12c6a

Please sign in to comment.