[sr-dev] question about module function arguments
Andrei Pelinescu-Onciul
andrei at iptel.org
Mon Oct 11 14:40:44 CEST 2010
On Oct 11, 2010 at 15:19, Juha Heinanen <jh at tutpro.com> wrote:
> Andrei Pelinescu-Onciul writes:
>
> > static int foo_var(struct sip_msg* msg, int argc, action_u_t argv[])
> > {
> > int i;
> > for (i = 0; i < argc; i++)
> > do_something(argv[i].u.string);
> > return 1;
> > }
>
> are both argv[i].u.string and argv[i].u.str set or only the first?
Both of them.
argv[i].u.string == argv[i].u.str.s (union)
argv[i].u.str.len is set if you don't use your own fixups (if you do,
the value is undefined).
Andrei
More information about the sr-dev
mailing list