From 46a4ba01855251aed46dd5bef2189013d8dc59cc Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Sun, 18 Feb 2024 09:54:18 -0500 Subject: [PATCH] MT#55283 fix regression from fe9d1f5ae3 poller_new used to have the side effect of initialising rtpe_now. Restore this side effect explicitly in the startup code, so that timers are launched with the correst start time instead of zero. Change-Id: I590061a9665b52c4aed00c06dc330d2a226c73d3 (cherry picked from commit 8458652d5fd937f6c11163ba0994f83aa2e48dd5) --- daemon/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/main.c b/daemon/main.c index 7a3ccdeb7..88393fe45 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -1089,6 +1089,7 @@ static void early_init(void) { } static void init_everything(void) { + gettimeofday(&rtpe_now, NULL); log_init(rtpe_common_config_ptr->log_name); log_format(rtpe_config.log_format); recording_fs_init(rtpe_config.spooldir, rtpe_config.rec_method, rtpe_config.rec_format); @@ -1127,6 +1128,8 @@ static void init_everything(void) { static void create_everything(void) { struct timeval tmp_tv; + gettimeofday(&rtpe_now, NULL); + if (rtpe_config.kernel_table < 0) goto no_kernel; if (kernel_setup_table(rtpe_config.kernel_table)) {