[OpenSER-Devel] Request for comment: module interface extension

Henning Westerholt henning.westerholt at 1und1.de
Mon Dec 17 11:48:18 UTC 2007


On Monday 17 December 2007, Juha Heinanen wrote:
> Henning Westerholt writes:
>  > We would suggest a extension to make this interface more flexible, to
>  > support more module function parameter, and to remove the unnecessary
>  > ones too.
>
> henning,
>
> it is great if you have time to work on this, but i would like to first
> see an exact syntax of what you plan to implement.
>
> for example, regarding module interface, would each function argument
> have its own fixup function instead of one fixup function taking care of
> all arguments?  if each would have its own, then i would think that it
> would be easier to build a generic fixup function library.
>
> also, would the new interface support optional function arguments,
> default values for missing arguments, how it is told which argument is
> what if arguments can be optional, etc.

Hi Juha,

changes like this are quite much work, e.g. even for the proposed small change 
its necessary to change the functions exports of over 80 modules. 

Extensions like you suggested is even more work for code and documentation. 
And beside the work, i prefer to work incrementally with a codebase like 
this.

So for now i suggest only to change the module functions export to:

typedef int (*cmd_function)(struct sip_msg*, int count, char **params);

The fixup functions are of course an area that could need some love too.. :-) 
A generic library of fixup functions would be great, i already moved some 
functions into modfix.h.

Cheers,

Henning



More information about the Devel mailing list