From: Jaroslav Kysela Date: Mon, 10 Dec 2018 15:08:50 +0000 (+0100) Subject: timers: little fixes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b32c76e24063f988eec7deb415df9c739004f84a;p=thirdparty%2Ftvheadend.git timers: little fixes --- diff --git a/src/main.c b/src/main.c index 3b10f0c59..180635abe 100644 --- a/src/main.c +++ b/src/main.c @@ -677,10 +677,8 @@ mtimer_thread(void *aux) tvh_mutex_unlock(&mtimer_lock); while (tvheadend_is_running()) { - now = mdispatch_clock_update(); - /* Global monoclock timers */ - + now = mdispatch_clock_update(); next = now + sec2mono(3600); while (1) { @@ -749,10 +747,9 @@ mainloop(void) tvh_mutex_lock(>imer_lock); gti = LIST_FIRST(>imers); if (gti == NULL || gti->gti_expire > now) { - if (gti) { + if (gti) ts.tv_sec = gti->gti_expire; - tvh_mutex_unlock(>imer_lock); - } + tvh_mutex_unlock(>imer_lock); break; }