mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
- update: fix release cycle handling; add human readable version string
Signed-off-by: GetAway <get-away@t-online.de>
This commit is contained in:
@@ -463,23 +463,21 @@ CFlashVersionInfo::CFlashVersionInfo(const std::string & _versionString)
|
||||
snapshot = versionString[0];
|
||||
|
||||
// recover release cycle version
|
||||
// will be compared with RELEASE_CYCLE, which is defined in configure.ac as "x.0"
|
||||
releaseCycle[0] = versionString[1];
|
||||
releaseCycle[1] = '.';
|
||||
/*
|
||||
if (versionString[2] == '0')
|
||||
{
|
||||
releaseCycle[2] = versionString[3];
|
||||
releaseCycle[3] = 0;
|
||||
}
|
||||
else
|
||||
*/
|
||||
{
|
||||
releaseCycle[2] = versionString[2];
|
||||
releaseCycle[3] = versionString[3];
|
||||
releaseCycle[4] = 0;
|
||||
}
|
||||
releaseCycle[2] = '0';
|
||||
releaseCycle[3] = 0;
|
||||
|
||||
// human readable version
|
||||
vstring[0] = versionString[1];
|
||||
vstring[1] = '.';
|
||||
vstring[2] = versionString[2];
|
||||
vstring[3] = versionString[3];
|
||||
vstring[4] = 0;
|
||||
|
||||
version = atoi(&versionString[1])*100 + atoi(&versionString[2])*10 + atoi(&versionString[3]);
|
||||
|
||||
version = atoi(&releaseCycle[0]) * 100 + atoi(&releaseCycle[2]);
|
||||
// recover date
|
||||
struct tm tt;
|
||||
memset(&tt, 0, sizeof(tt));
|
||||
@@ -561,6 +559,11 @@ int CFlashVersionInfo::getVersion(void) const
|
||||
return version;
|
||||
}
|
||||
|
||||
const char *CFlashVersionInfo::getVersionString(void) const
|
||||
{
|
||||
return vstring;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
CMTDInfo::CMTDInfo()
|
||||
|
Reference in New Issue
Block a user