update: use fileType instead of a string to check for experimental image

Origin commit data
------------------
Commit: 72ad3eb2a1
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-06 (Sat, 06 Jan 2018)

Origin message was:
------------------
- update: use fileType instead of a string to check for experimental image
This commit is contained in:
vanhofen
2018-01-06 00:06:40 +01:00
parent ddd0a01708
commit f49bdaec3f

View File

@@ -412,18 +412,16 @@ bool CFlashUpdate::checkVersion4Update()
versionInfo = new CFlashVersionInfo(newVersion);//Memory leak: versionInfo
sprintf(msg, g_Locale->getText(msg_body), versionInfo->getDate(), versionInfo->getTime(), versionInfo->getReleaseCycle(), versionInfo->getType());
if(fileType <= '2')
if (fileType <= '2')
{
if ((strncmp(RELEASE_CYCLE, versionInfo->getReleaseCycle(), 2) != 0) &&
(ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_WRONGBASE, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE) != CMsgBox::mbrYes))
{
delete versionInfo;
//ShowHint(LOCALE_MESSAGEBOX_ERROR, LOCALE_FLASHUPDATE_WRONGBASE);
return false;
}
if ((strcmp("Release", versionInfo->getType()) != 0) &&
//(ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_EXPERIMENTALIMAGE, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE) != CMsgBox::mbrYes))
if ((fileType != '0' /*Release*/) &&
(ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_EXPERIMENTALIMAGE, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE) != CMsgBox::mbrYes))
{
delete versionInfo;