mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-04 12:18:27 +02:00
update: fix release cycle handling; add human readable version string
Origin commit data
------------------
Branch: ni/coolstream
Commit: 87d60639ae
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-11-29 (Thu, 29 Nov 2018)
Origin message was:
------------------
- update: fix release cycle handling; add human readable version string
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -481,23 +481,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));
|
||||
@@ -579,6 +577,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