[Devel] Re: $hdr($avp(s:name))

JF jfkavaka at gmail.com
Thu Jan 18 01:09:57 CET 2007


I nailed it down to what is apparently a bug in items.c, when
searching for the $avp inside the $hdr in the following line within
function xl_get_avp:

if ((avp=search_first_avp(name_type, avp_name, &avp_value, 0))==0) {

Changing name_type to AVP_NAME_STR|AVP_VAL_STR solved the problem, but
this seems to be related to some problem with the flags parameter.

JF

On 1/17/07, JF <jfkavaka at gmail.com> wrote:
> Trying to debug this using
> xlog("L_INFO", "HEADER: $avp(s:value1), CONTENT: $hdr($avp(s:value1))\n");
>
> I notice inside items.c (within xl_printf function) that
> xl_get_spec_value(msg, &(it->spec),
>                                         &tok, 0)
>
> is called with no flags (last param is 0). Shouldn't it be "it->spec.flags" ?
>
> When there are dynamic params, flag XL_DPARAM is used. It seems it's
> not being considered... or is being lost at fixup?
>
> Maybe one of the core developers could help here?
>
> Thanks in advance,
>
> JF
>
> On 1/17/07, JF <jfkavaka at gmail.com> wrote:
> > Hi all,
> >
> > Is there support for dynamic avp/hdr names, like
> >
> > $hdr($avp(s:name))
> >
> > I'm getting <null> when I try this... and I've checked that
> > $avp(s:name) has a valid header name (Contact).
> >
> > Thanks,
> >
> > JF
> >
>



More information about the Devel mailing list