Feature #4539
closedreview timer numbers: use (negative) X-timers instead of non-existing T-timers (like T23001), and avoid collisions of X-timer numbers across osmocom programs
100%
Description
the 3GPP specs define various timers like T3001, which we made configurable via vty using the osmo_tdef API.
Later on, we introduced the use of negative timer numbers to indicate timers that are not specified by 3GPP, and called them X-timers, like X1, X2,...
At that point, various invented timer numbers have already been in use, see for example timeslot_fsm.c and lchan_fsm.c in osmo-bsc: T23001 etc.
Timer numbers can be re-used in different contexts, so per se we could use X1 any number of times in different contexts.
However, since we have a huge number space available for X-timers, there is no need to create "collisions" between osmocom programs.
It is much clearer to just pick unused numbers for each program, sort of like out Port_Numbers.
Create one common overview of all X-timers (and while at it, why not also all T-timers) available in osmocom programs.
Replace osmocom-invented T-timers with X-timers,
avoid X-timer collisions between osmocom programs.
Not sure whether we should provide a backwards compat shim to still allow configuring old timer numbers, so that setting the old timer numbers actually adjusts the new ones?
Or maybe just make sure that configuring the new timer number causes an error message on program start indicating the matching new X-timer to use?
Related issues