[OpenSIPS-Users] $var(NAME) = NULL; what is the value ?

Podrigal, Aron aronp at guaranteedplus.com
Fri Jul 3 06:46:04 CEST 2015


Thanks Jarrod

On Thu, Jul 2, 2015 at 10:52 PM, Jarrod Baumann <jarrod at unixc.org> wrote:

> I guess that documentation needs to be updated because it appears NULL
> support was added to pseudo vars at some point. I traced down the pvar
> assignment in gdb where the flag was NULL and it was assigned str_null:
>
> static char _str_null_hlp[7] = {'<','n','u','l','l','>',0};
> static str str_null   = { _str_null_hlp, 6 };
>
> The default used to by PV_VAL_INT I guess which always initialized to 0…
> however this may have posed a problem along the way when actually needing
> to represent a NULL value returned from a database or something else.
>
> Jarrod
>
> On Jul 2, 2015, at 9:20 PM, Podrigal, Aron <aronp at guaranteedplus.com>
> wrote:
>
> According to the documentation here [1] the value of $var(NAME) = NULL;
> should be the integer 0.
> However when I test it with xlog, it does print <null>.
>
>
> [1] http://www.opensips.org/Documentation/Script-CoreVar#toc1
>
> --
> Aron Podrigal
> -
> //Be happy :-)
>  _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


-- 
Aron Podrigal
-
//Be happy :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150702/442747f7/attachment.htm>


More information about the Users mailing list