Module: sip-router
Branch: master
Commit: dfdc81a55ec2951f9c6559e792f81fbba08b5c51
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dfdc81a…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Wed Oct 21 14:16:38 2009 +0200
cr: fix bug in recently introduced nofallback function, also remove wrong check
---
modules/carrierroute/cr_func.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/modules/carrierroute/cr_func.c b/modules/carrierroute/cr_func.c
index 1dd15c8..c1fcf21 100644
--- a/modules/carrierroute/cr_func.c
+++ b/modules/carrierroute/cr_func.c
@@ -436,11 +436,7 @@ static int rewrite_on_rule(struct route_flags *rf_head, flag_t flags,
str * dest
}
break;
case alg_crc32_nofallback:
- if(rf->max_targets == 0) {
- LM_ERR("invalid dice_max value\n");
- return -1;
- }
- if ((prob = (hash_func(msg, hash_source, rf->dice_max) + 1)) < 0) {
+ if ((prob = (hash_func(msg, hash_source, rf->max_targets) + 1)) < 0) {
LM_ERR("could not hash message with CRC32");
return -1;
}