[OpenSER-Devel] returning 0 from function

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Mar 4 16:32:16 CET 2008


Hi Henning,

We need to consider the user (script writer) experience also. As Klaus 
stated, there are many function just breaking script (returning script) 
because the user should not do anything further.
The best example is t_newtran() or t_check_trans() - if a retransmission 
is detected, TM module will automatically handle this is the correct way 
(according to RFC 3261) and exist - this is something the user should 
not care about how to handle....

So, disregarding the implementation details, I strongly consider that we 
need to keep the possibility for a function to break the script execution.

Regards,
Bogdan

Henning Westerholt wrote:
> On Monday 03 March 2008, Juha Heinanen wrote:
>   
>> Dan Pascu writes:
>>  > AFAIK, there are functions in tm that rely on this, including t_relay if
>>  > I'm not mistaken. I'd say that until a list of the module functions that
>>  > use this behavior is made so we can draw a conclusion, it's premature to
>>  > assume this will be easy to change, or that is even possible to give up
>>  > on the behavior without major code restructuring.
>>
>> in my openser.cfg i do call exit also after t_relay.  i think is it is
>> very bad programming practice to relay certain functions to exit the
>> script implicitly.  in my opinion, no module function should cause the
>> script to exit.  it should be always the decision of script writer.
>>     
>
> Hi Juha,
>
> yes, i've also the same opinion. But there will be probably many configs out 
> there that do rely on this behaviour, and will break if we change this. So i 
> also think this is not something that we should treat lightly.
>
> Cheers,
>
> Henning
>
> _______________________________________________
> Devel mailing list
> Devel at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/devel
>
>   




More information about the Devel mailing list