@@ -1897,9 +1897,9 @@ static DocParseErr_t initDocModel( JsonDocModel_t * pDocModel,
18971897static OtaErr_t validateUpdateVersion ( const OtaFileContext_t * pFileContext )
18981898{
18991899 OtaErr_t err = OtaErrNone ;
1900- AppVersion32_t newVersion ;
1900+ AppVersion32_t previousVersion ;
19011901
1902- ( void ) newVersion ; /* For suppressing compiler-warning: unused variable. */
1902+ ( void ) previousVersion ; /* For suppressing compiler-warning: unused variable. */
19031903
19041904 /* Only check for versions if the target is self */
19051905 if ( ( otaAgent .serverFileID == 0U ) && ( otaAgent .fileContext .fileType == configOTA_FIRMWARE_UPDATE_FILE_TYPE_ID ) )
@@ -1928,12 +1928,12 @@ static OtaErr_t validateUpdateVersion( const OtaFileContext_t * pFileContext )
19281928 * Update version received is newer than current version. */
19291929 else
19301930 {
1931- newVersion .u .unsignedVersion32 = pFileContext -> updaterVersion ;
1931+ previousVersion .u .unsignedVersion32 = pFileContext -> updaterVersion ;
19321932 LogInfo ( ( "New image has a higher version number than the current image: "
1933- "Old image version=%u.%u.%u"
1934- ", New image version=%u.%u.%u" ,
1933+ "New image version=%u.%u.%u"
1934+ ", Previous image version=%u.%u.%u" ,
19351935 appFirmwareVersion .u .x .major , appFirmwareVersion .u .x .minor , appFirmwareVersion .u .x .build ,
1936- newVersion .u .x .major , newVersion .u .x .minor , newVersion .u .x .build ) );
1936+ previousVersion .u .x .major , previousVersion .u .x .minor , previousVersion .u .x .build ) );
19371937 }
19381938 }
19391939
0 commit comments