Module: sip-router Branch: kamailio_3.0 Commit: 16bdf9ea21b310d49d5d99dee43cfd57990eb1bb URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=16bdf9ea21b310d49d5d99dee43cfd57990eb1bb
Author: Marius Zbihlei <[email protected]> Committer: Marius Zbihlei <[email protected]> Date: Tue May 4 13:10:03 2010 +0300 Modules:carrierroute: Fixed a bug in carrirroute module that might cause a crash if the routing prob was larger than the number of available routes. The problem was caused by a missing else --- modules/carrierroute/cr_func.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/carrierroute/cr_func.c b/modules/carrierroute/cr_func.c index d37d658..ff43242 100644 --- a/modules/carrierroute/cr_func.c +++ b/modules/carrierroute/cr_func.c @@ -257,7 +257,7 @@ static struct route_rule * get_rule_by_hash(const struct route_flags * rf, LM_WARN("too large desired hash, taking highest\n"); act_hash = rf->rules[rf->rule_num - 1]; } - act_hash = rf->rules[prob - 1]; + else act_hash = rf->rules[prob - 1]; if (!act_hash->status) { if (act_hash->backup && act_hash->backup->rr) { _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
