Module: sip-router
Branch: master
Commit: 4fece01ed8687e1be8678dd4de63cebd2095d95b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4fece01…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Tue Sep 8 18:03:50 2009 +0200
cr: bug fix in new introduced function, cr_nofallback_routing
---
modules/carrierroute/cr_func.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/carrierroute/cr_func.c b/modules/carrierroute/cr_func.c
index fc16b0c..607d7a2 100644
--- a/modules/carrierroute/cr_func.c
+++ b/modules/carrierroute/cr_func.c
@@ -425,11 +425,11 @@ static int rewrite_on_rule(struct route_flags *rf_head, flag_t
flags, str * dest
}
break;
case alg_crc32_nofallback:
- if(rf->dice_max == 0) {
+ if(rf->max_targets == 0) {
LM_ERR("invalid dice_max value\n");
return -1;
}
- if ((prob = hash_func(msg, hash_source, rf->dice_max)) < 0) {
+ if ((prob = (hash_func(msg, hash_source, rf->dice_max) + 1)) < 0) {
LM_ERR("could not hash message with CRC32");
return -1;
}