Skip to content

Commit

Permalink
nameservice.c: adjust writing files
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Akira25 committed Apr 28, 2022
1 parent 1e771b4 commit 7e3252a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/nameservice/src/nameservice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 writ-intervalls
write_file_timer = olsr_start_timer(my_filewrite_interval * MSEC_PER_SEC, 0, OLSR_TIMER_ONESHOT, olsr_expire_write_file_timer, NULL, 0);
}

/*
Expand Down

0 comments on commit 7e3252a

Please sign in to comment.