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.

no objectsion from the others?...

I'm going to commit this to cvs, even while Alex means there are more elegant ways to solve this. I agree. When using a cleaner API for add-on boxes this should go away, but until then it shows-up to be usable and hence considered as add-on (non behaviour change) commit.

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