[Devel] CVS commitlog: sip-server/modules/domain README domain.c
domain_mod.c sip-server/modules/domain/doc domain_user.sgml
Dan Pascu
dan at ag-projects.com
Sat Sep 30 22:48:24 CEST 2006
On Saturday 30 September 2006 23:04, Juha Heinanen wrote:
> Dan Pascu writes:
> > > - in w_is_domain_local, why do you use xl_printf_s to get the
> > > domain instead of (i would assume) faster xl_get_spec_value?
> >
> > Mainly because I didn't know about the latter.
>
> that is used in other modules that need access to avp value. they use
> xl_parse_spec to parse the pseudo variable in fixup and then
> xl_get_spec_value when value of pseudo variable is accessed by config
> functions.
Well, the code I used as inspiration (the rr module) used xl_printf_s so
this is what I ended using. I wasn't aware of the other possibility until
you mentioned it.
>
> > Feel free to replace it as
> > long as you think it's better and it doesn't change the behavior.
>
> i don't know if using xl_parse_spec changes behavior. it accepts any
> pseudo variable as parameter. it may not handle string parameter, but
> you can always assign a string to an avp. also, i don't know what
> would be the use case of asking in config file if a fixed string value
> is local domain.
The handling of fixed strings was not intended in the first place, it was
a side effect of what xl_printf_s accepted, so I thought it's worth
mentioning in the docs so that people won't be surprised by differences
in behavior compared to documentation. However I agree with you, I do not
see a use case of fixed string domain testing either and if it's removed
I don't think anyone will ask for it. I also don't see (at least for the
moment) a use case for the other ability of xl_printf_s (to combine
multiple AVPs and PVs printf like). Taking these 2 out, I guess in the
other aspects they must be pretty much the same.
--
Dan
More information about the Devel
mailing list