From c226564bb873c47028473479b0dd7bede5bbda42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20H=C3=BCbner?= Date: Thu, 28 Apr 2022 13:53:00 +0200 Subject: [PATCH] nameservice.c: adjust writing files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At Freifunk Berlin we experienced fairly random updates on the files. This resulted from the calc_jitter() function in the scheduler.c. By calling the function with a jitter of 0% there shouldn't be any randomness anymore and the nameservice-files should get written on schedule. Signed-off-by: Martin Hübner --- lib/nameservice/src/nameservice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nameservice/src/nameservice.c b/lib/nameservice/src/nameservice.c index 636e351bb..cc4c86f63 100644 --- a/lib/nameservice/src/nameservice.c +++ b/lib/nameservice/src/nameservice.c @@ -567,7 +567,8 @@ olsr_start_write_file_timer(void) return; } - write_file_timer = olsr_start_timer(my_filewrite_interval * MSEC_PER_SEC, 5, OLSR_TIMER_ONESHOT, olsr_expire_write_file_timer, NULL, 0); + // set jitter (second param) to 0, to get deterministic write-intervals + write_file_timer = olsr_start_timer(my_filewrite_interval * MSEC_PER_SEC, 0, OLSR_TIMER_ONESHOT, olsr_expire_write_file_timer, NULL, 0); } /*