mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 01:41:12 +02:00
eitd: -GENERIC- set neutrino time from system, for non-root user
Origin commit data
------------------
Commit: 7ddc698fc6
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-12-27 (Fri, 27 Dec 2019)
This commit is contained in:
@@ -1463,6 +1463,16 @@ void CTimeThread::addFilters()
|
|||||||
|
|
||||||
void CTimeThread::run()
|
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;
|
time_t dvb_time = 0;
|
||||||
bool retry = false; /* if time seems fishy, set to true and try again */
|
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());
|
debug(DEBUG_ERROR, "%s::run:: starting, pid %d (%lu)", name.c_str(), getpid(), pthread_self());
|
||||||
|
Reference in New Issue
Block a user