[sr-dev] git:master:bb768faa: ratelimit module not working properly when FEEDBACK algorithm is used
Guilherme C Pilon
gpilon at daitangroup.com
Sun Dec 4 09:54:38 CET 2016
Module: kamailio
Branch: master
Commit: bb768faae3367c1209e735de71ab9fdcd5d068d5
URL: https://github.com/kamailio/kamailio/commit/bb768faae3367c1209e735de71ab9fdcd5d068d5
Author: Guilherme C Pilon <gpilon at daitangroup.com>
Committer: Guilherme C Pilon <gpilon at daitangroup.com>
Date: 2016-11-30T13:33:44-02:00
ratelimit module not working properly when FEEDBACK algorithm is used
---
Modified: modules/ratelimit/ratelimit.c
---
Diff: https://github.com/kamailio/kamailio/commit/bb768faae3367c1209e735de71ab9fdcd5d068d5.diff
Patch: https://github.com/kamailio/kamailio/commit/bb768faae3367c1209e735de71ab9fdcd5d068d5.patch
---
diff --git a/modules/ratelimit/ratelimit.c b/modules/ratelimit/ratelimit.c
index 69fcd74..72619fa 100644
--- a/modules/ratelimit/ratelimit.c
+++ b/modules/ratelimit/ratelimit.c
@@ -361,7 +361,6 @@ static int get_cpuload(double * load)
/* divide by numbers of cpu */
ncpu = get_num_cpus();
- vload = vload/ncpu;
vload = 1.0 - vload;
if(vload<0.0) vload = 0.0;
else if (vload>1.0) vload = 1.0;
More information about the sr-dev
mailing list