Henning Westerholt wrote:
On Wednesday 17 February 2010, Miklos Tirpak wrote:
[..] 2) Some modules update local or even shared memory variables based on cfg variable changes. It would be nice to solve as many cases within the framework as possible. For example the modules could have write access to their variables during fixup, or more complicated structures could be stored not only int and str vars. If you miss any feature therefore you keep variables outside of the framework then please speak up!
Hi Miklos,
indeed this is another problem which we've also discussed during the planning for the cfg framework migration work, its present for example in the ratelimit and carrierroute modules.
Quite a few kamailio modules implemented also their own version of reload functionality with a FIFO command, e.g. "reload_fifo" in modules/carrierroute/cr_fifo.c. This is more or less a similar use case like the cfg framework represents (atomic reload of a variable), but with a a bit more complicated data structure (route_data_t).
So having a generic version for this in the cfg framework would be indeed nice in my opinion.
Cheers,
Henning
Hello,
I have done some tests regarding the on_set_child_cb function (executed only once via CFG_CB_ONLY_ONCE or per each child process) and for what I want it does a good job. If the maximum delay is 1/16th of a second and above that, it will not create bugs like the one Andrei described in a previous mail, then I think this approach is good enough for the cases I identified.
Cheers, Marius