mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
sectionsd: move function build_time() to helpers
Origin commit data
------------------
Branch: ni/coolstream
Commit: 3c23415516
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-01-11 (Tue, 11 Jan 2022)
Origin message was:
------------------
- sectionsd: move function build_time() to helpers
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -162,15 +162,6 @@ CSdtThread threadSDT;
|
||||
static int64_t lockstart = 0;
|
||||
#endif
|
||||
|
||||
inline time_t build_time()
|
||||
{
|
||||
static const char *built = __DATE__ " " __TIME__;
|
||||
struct tm t;
|
||||
t.tm_isdst = -1;
|
||||
strptime(built, "%b %d %Y %H:%M:%S", &t);
|
||||
return mktime(&t);
|
||||
}
|
||||
|
||||
static int sectionsd_stop = 0;
|
||||
|
||||
static bool slow_addevent = true;
|
||||
@@ -1585,7 +1576,7 @@ void CTimeThread::run()
|
||||
sleep_time = 5;
|
||||
}
|
||||
/* in case of wrong TDT date, dont send time is set */
|
||||
if(time_ntp || (dvb_time > build_time())) {
|
||||
if(time_ntp || (dvb_time > GetBuildTime())) {
|
||||
sendTimeEvent(time_ntp, dvb_time);
|
||||
debug(DEBUG_ERROR, "%s: Time set via %s, going to sleep for %d seconds.", name.c_str(),
|
||||
time_ntp ? "NTP" : first_time ? "DVB (TDT)" : "DVB (TOT)", sleep_time);
|
||||
|
@@ -2032,6 +2032,15 @@ bool isDigitWord(std::string str)
|
||||
return true;
|
||||
}
|
||||
|
||||
time_t GetBuildTime()
|
||||
{
|
||||
static const char *built = __DATE__ " " __TIME__;
|
||||
struct tm t;
|
||||
t.tm_isdst = -1;
|
||||
strptime(built, "%b %d %Y %H:%M:%S", &t);
|
||||
return mktime(&t);
|
||||
}
|
||||
|
||||
int getBoxMode()
|
||||
{
|
||||
int boxmode = -1;
|
||||
|
@@ -196,6 +196,7 @@ bool downloadUrl(std::string url, std::string file, const std::string userAgent
|
||||
|
||||
bool isDigitWord(std::string str);
|
||||
|
||||
time_t GetBuildTime();
|
||||
int getBoxMode();
|
||||
int getActivePartition();
|
||||
|
||||
|
Reference in New Issue
Block a user