eitd: -GENERIC- set neutrino time from system, for non-root user

Origin commit data
------------------
Branch: ni/coolstream
Commit: 7ddc698fc6
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-12-27 (Fri, 27 Dec 2019)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2019-12-27 20:51:17 +01:00
committed by vanhofen
parent cfc16c6b25
commit 35cbb6f782

View File

@@ -1463,6 +1463,16 @@ void CTimeThread::addFilters()
void CTimeThread::run()
{
#if HAVE_GENERIC_HARDWARE
if (getuid()){
debug(DEBUG_NORMAL, "Set Neutrino time from system (PC). You are not root.");
struct timeval tv;
gettimeofday(&tv, NULL);
sendTimeEvent(0, tv.tv_sec);
return;
}
#endif
time_t dvb_time = 0;
bool retry = false; /* if time seems fishy, set to true and try again */
debug(DEBUG_ERROR, "%s::run:: starting, pid %d (%lu)", name.c_str(), getpid(), pthread_self());