Stipe Tolj wrote:
Hi list,

now, as Kannel maintains its own way of "knowing" what config directives are allowed in group sections, this is a problem if external modules, ie. Rene's sqlbox or Paul's Mbuni need to use the same gwlib/cfg.[ch] thingies.

I tried to introduce a generic hooking mechanism for the 2 functions is_allowed_in_group() and is_single_group() that use the #include "cfg.def" for the core.

Now extenal modules can use cfg_add_hooks(void *a, void *b) to offer their own "version" of these 2 routines and hence #include "foobar-cfg.def" in their own code space.

The hooks are appended to a list and a wrapper loops arround the functiokns in the lists to get a boolean value.

I know that this is not the most elegant way. Alex suggested using dlopne() and dlsym(), which are of course a "better" approach, but still we need to "concatenate" the defined groups and I had no idea how to do.

Please review and vote.

BTW, there is no logic change or behaviour change for the normal core Kannel. It will put it's own core_foobar() functions into the list and process on them only, in case no external module add hooks here.

So, nothing that harms existing configs.

Stipe

-------------------------------------------------------------------
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture      Kannel Software Foundation (KSF)
http://www.tolj.org/              http://www.kannel.org/

mailto:st_{at}_tolj.org           mailto:stolj_{at}_kannel.org
-------------------------------------------------------------------

Reply via email to