[OpenSER-Devel] return argument

Daniel-Constantin Mierla miconda at gmail.com
Mon Feb 25 21:11:06 CET 2008


Hello,

On 02/25/08 08:34, Juha Heinanen wrote:
> i remember that someone asked a while ago, if return statement accepts a
> pseudo variable argument.
>
> looks like it still doesn't because something like this resulted in
> syntax error at return line:
>
> route[1] {
> 	route(2);
> 	return($retcode);
> }
>
> i "solved" the problem like this:
>
> route[1] {
> 	route(2);
> 	switch($retcode) {
> 	case 1:
> 		return(1);
> 	case 2:
> 		return(2);
> 	default:
> 		return(-1);
> 	}
> }
>
> which is not pretty.  if i didn't make a mistake in above and return
> statement does not accept a pv argument, i would like to put this
> feature on 1.4 wish list.
>   
no, it is not implemented yet, but I had it in mind for some time -- I 
remember also some discussion about. Please add to the tracker not to 
forget about it again, until next release.

Cheers,
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