From b32c76e24063f988eec7deb415df9c739004f84a Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 10 Dec 2018 16:08:50 +0100 Subject: [PATCH] timers: little fixes --- src/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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; } -- 2.47.2