[Users] Dispatcher crash OpenSER
Federico Cabiddu
federico.cabiddu at abbeynet.it
Fri Jun 8 16:16:25 CEST 2007
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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20070608/22ed69b6/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: medium_claim.gif
Type: image/gif
Size: 1686 bytes
Desc: not available
Url : http://lists.kamailio.org/pipermail/users/attachments/20070608/22ed69b6/attachment.gif
More information about the Users
mailing list