Module: sip-router Branch: master Commit: 2095981e8bc7f25c39099c72468b61cf9a5dca59 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2095981e...
Author: Marius Zbihlei marius.zbihlei@1and1.ro Committer: Marius Zbihlei marius.zbihlei@1and1.ro 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 a09866c..382df16 100644 --- a/modules/carrierroute/cr_func.c +++ b/modules/carrierroute/cr_func.c @@ -249,7 +249,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) {