Module: kamailio
Branch: master
Commit: 2b59506d3699bb34b4b932cea5c7cdab3da418e0
URL:
https://github.com/kamailio/kamailio/commit/2b59506d3699bb34b4b932cea5c7cda…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2016-12-04T09:54:34+01:00
Merge pull request #873 from guipilon/master
ratelimit module not working properly when FEEDBACK algorithm is used
---
Modified: modules/ratelimit/ratelimit.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2b59506d3699bb34b4b932cea5c7cda…
Patch:
https://github.com/kamailio/kamailio/commit/2b59506d3699bb34b4b932cea5c7cda…
---
diff --git a/modules/ratelimit/ratelimit.c b/modules/ratelimit/ratelimit.c
index 69fcd74..b8a053e 100644
--- a/modules/ratelimit/ratelimit.c
+++ b/modules/ratelimit/ratelimit.c
@@ -359,9 +359,6 @@ static int get_cpuload(double * load)
vload = ((double)d_idle) / (double)d_total;
- /* 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;