[OpenSER-Devel] more on != test problem

Daniel-Constantin Mierla daniel at voice-system.ro
Sun Feb 17 23:09:20 CET 2008



On 02/17/08 10:38, Juha Heinanen wrote:
> if i execute this piece of code:
>
> 	$var(tmp) = $rU + "@" + $rd;
> 	if ($avp(i:301) != $var(tmp)) {
> 		xlog("L_INFO", "var test <$avp(i:301)> != <$var(tmp)>\n");
> 		sl_send_reply("500", "Unauthorized");
> 		exit;
> 	};
> 	if ($avp(i:301) != "$rU@$rd") {
> 		xlog("L_INFO", "exp test <$avp(i:301)> != <$rU@$rd>\n");
> 		sl_send_reply("500", "Unauthorized");
> 		exit;
> 	};
>
> i get to syslog
>
> Feb 17 10:36:16 rautu /usr/sbin/openser[28914]: exp test <jh at test.fi> != <jh at test.fi> 
>
> i.e., != comparison to var works, but to pvar expression doesn't.  if
> comparing to pvar expression is not supported, syntax checker should
> detect it.
>   
the tokens between quotes in the configuration file are static strings. 
They are not expressions -- the content is not expanded. In the 
functions exported by modules, the fixup replaces the string parameter 
with some other structure, which is interpreted at runtime.

Daniel

> -- juha
>
> _______________________________________________
> Devel mailing list
> Devel at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/devel
>
>   



More information about the Devel mailing list