Andrei Pelinescu-Onciul writes:

> Because "==" works only with arguments of the same type, 0 it's
> autoconverted to "0". The alternative would be to log an error.

andrei,

please log an error, because it is hard to remember this uncommon
comparison rule and seeing an error message would reveal the problem
fast.

> Here are the rules for ==:
> /* if left is string, eval left & right as string and  use string diff.
>  * if left is int eval as int using int diff
>  * if left is undef, look at right and convert to right type
>  */

getting back to the example code, how can i check if value of a var
is int 0?  is there an is_int function?

-- juha

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to