[sr-dev] question about module function arguments

Juha Heinanen jh at tutpro.com
Wed Oct 13 15:14:28 CEST 2010


Andrei Pelinescu-Onciul writes:

> I you want variable number of parameters, the module function
> declaration should look like:
>     {"foov", (cmd_function)foo_var, VAR_PARAM_NO, 0, 0,
> REQUEST_ROUTE}

andrei,

when i compare the above example with modules_s/print example:

	{"printv", (cmd_function)print_f_var, VAR_PARAM_NO, 0,
	REQUEST_ROUTE},

the difference is that in foov example there is one field more.  i guess
it has something to do with s vs. k module interface.  when i look
sr_module.h there is ifdefs KAMAILIO_MOD_INTERFACE.  is it possible to
match and match module interfaces on per module basis by including

#define SER_MOD_INTERFACE

or

#define KAMAILIO_MOD_INTERFACE

in the main source file of the module?

it would really be nice if there were a wiki page about this (including
the fixup stuff).

-- juha



More information about the sr-dev mailing list