[sr-dev] $var null confusion

Daniel-Constantin Mierla miconda at gmail.com
Wed Dec 11 11:04:22 CET 2013


Hello,

On 10/12/13 01:28, Juha Heinanen wrote:
> the fact that $var cannot hold value seems to be a constant cause of
> confusion.
this confusion is similar to the fact that $ci cannot be null as well 
(or many other pvs). Then also $avp(...) doesn't hold $null value -- 
is_null(...) for an avp is 'it doesn't exist'.

There is a patch for it and is not big, but I don't find it really 
clarifying the overall situation just moving to a new behavior the 
$val(...). I proposed to make it configurable via mod param, but then 
was no other follow up. Now I think it might be better to make it a new 
class of variables and proper say in docs that one can hold $null, the 
other cannot hold - e.g., $lv(...) for local variable . I do rely a lot 
on the fact that $var(...) comes initialized with 0 and it is reset to 0.

For anyone interesting in working on it, patch is on tracker:
https://sip-router.org/tracker/index.php?do=details&task_id=141#comment244
Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-dev mailing list