[prev in list] [next in list] [prev in thread] [next in thread]
List: serdev
Subject: [Serdev] how are arguemnts supplied to functions called from
From: rao_ser () yahoo ! com (Rao)
Date: 2004-03-29 22:00:49
Message-ID: 20040329200114.36141.qmail () web60602 ! mail ! yahoo ! com
[Download RAW message or body]
Andrei,
Thanks for the answer. I was confused since the
documentation does not mention that the sip message
structure is passed by default (I kind of assume it
did) and I was too afraid and unfamiliar to look at
the
yacc/lex code :-)
Thanks a lot for your help.
Rao.
--- Andrei Pelinescu-Onciul
<pelinescu-onciul@fokus.fraunhofer.de> wrote:
> On Mar 28, 2004 at 01:34, Rao <rao_ser@yahoo.com>
> wrote:
> > Hi,
> >
> > Can someone please tell me how are arguments
> supplied to functions such
> > as loose_route(), t_relay() etc when they are
> called from the config file.
> >
>
> Right now all modules registered functions must take
> by default one
> parameter which is the sip message structure, and
> they can use 2
> additional ones, which are the arguments used when
> calling them from the
> script.
>
> E.g: t_relay() in tm.c
> static int w_t_relay( struct sip_msg *p_msg , char
> *_foo, char *_bar);
>
> static cmd_export_t cmds[]={
> ...
> {T_RELAY, w_t_relay, 0,
> 0,
> REQUEST_ROUTE |
> FAILURE_ROUTE },
> ...
>
> In this case w_t_relay takes 0 additional parameters
> (soo foo & bar
> won't contain anything), and there is no fixup
> function ( 0, 0 in the
> above initialization).
>
>
> Andrei
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic