[OpenSER-Devel] returning 0 from function

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 3 09:43:01 CET 2008



On 03/03/08 10:38, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>  > by returning 0, the execution of the script is interrupted -- same 
>  > behavior as 'exit'.
>
> that is what i suspected.  in my opinion there is too much "under cover"
> things happening here.  it would be easier to debug and understand
> things if script would not terminate implicitly like this, but only if
> explicitly terminated by 'exit' or running out from the last route
> block.
>   
perhaps going to clear return codes handling will be better. Since the 
beginning of ser, the meaning of return codes was:
- greater than 0  was considered true
- less than 0 was considered false
- 0 was considered exit.

Now it is about backward compatibility on a hand and clear and better 
understanding return code handling on the other hand. Perhaps a debate 
on devel/users will make decision easier.

Daniel

> -- juha
>   



More information about the Devel mailing list