[sr-dev] setbflag
Daniel-Constantin Mierla
miconda at gmail.com
Mon Jun 1 18:41:20 CEST 2009
On 06/01/2009 07:36 PM, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
> > The question is how I specify to a function exported by a module that
> > the parameter is integer. While the config grammar accepts such case,
> > the interface does not offer a way to do it (or I am missing something).
>
> why would you need to be able to specify it? if i write
>
I am talking about the definition of the function, in K the prototype
takes char* parameters:
http://www.asipto.com/pub/kamailio-devel-guide/#c16cmd_function
The you can have fixup functions that can convert from string to
soemthing else.
All K modules' exported function are built with this architecture in
mind - the parameters from script are passed as string during startup,
they can convert to something else with fixups. Now, to understand that
the int parameter in converted to string to be passed to fixup function?
Cheers,
Daniel
> isbflagset(15)
>
> the function will get an int value. if that is not correct, then you
> get an error whet you try to execute that function. the same thing as
> if i write
>
> isbflagset($pv)
>
> compiler cannot tell, if value of $pv is int or string.
>
> -- juha
>
--
Daniel-Constantin Mierla
http://www.asipto.com/
More information about the sr-dev
mailing list