[Users] Dispatcher crash OpenSER

Daniel-Constantin Mierla daniel at voice-system.ro
Fri Jun 8 19:35:11 CEST 2007


Hello,

indeed, there was an issue for that case. I applied your fix on SVN. Thanks.

Daniel

On 06/08/07 17:16, Federico Cabiddu wrote:
> Playing with my dispatcher configuration (openser-1.2.1) I discovered 
> that ds_select_dst() crashes openser when dispatche param 
> ds_use_default is set to 1 and the set from where the destination is 
> picked up contains just one address. This appens because in dispatch.c 
> at row 784 the code is
>
> if(ds_use_default!=0)
>                 hash = hash%(_ds_list[idx].nr-1);
>         else
>                 hash = hash%_ds_list[idx].nr;
>
> so if ds_use_default is set and the address set has 1 destination the 
> % causes a crash.
> To avoid this it's enough to modifiy the if statement like:
>
> if (ds_use_default!=0 && _ds_list[idx].nr!=1)
>
> Just my two cents.
> Regards,
> Federico
> -- 
>
> Federico Cabiddu R&D Software Engineering
> Abbeynet S.p.A. - www.abbeynet.com <http://www.abbeynet.com>
>
> phone: +39 070 2339349
>
> <http://www.federico_cabiddu.sitofono.it>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>   




More information about the sr-users mailing list