Module: kamailio
Branch: master
Commit: 0115d3424c0f8780a661882527f39b2b39d0e74e
URL:
https://github.com/kamailio/kamailio/commit/0115d3424c0f8780a661882527f39b2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-04-23T19:04:58+02:00
dispatcher: handle the case of maxload 0 for call load distribution
- GH #2297
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0115d3424c0f8780a661882527f39b2…
Patch:
https://github.com/kamailio/kamailio/commit/0115d3424c0f8780a661882527f39b2…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 6ded012085..004bb0cfae 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -2273,6 +2273,7 @@ int ds_manage_routes(sip_msg_t *msg, ds_select_state_t *rstate)
}
/* max load exceeded per destination */
if(rstate->alg == DS_ALG_CALLLOAD
+ && idx->dlist[i].attrs.maxload != 0
&& idx->dlist[i].dload >= idx->dlist[i].attrs.maxload) {
continue;
}
@@ -2294,6 +2295,7 @@ int ds_manage_routes(sip_msg_t *msg, ds_select_state_t *rstate)
}
/* max load exceeded per destination */
if(rstate->alg == DS_ALG_CALLLOAD
+ && idx->dlist[i].attrs.maxload != 0
&& idx->dlist[i].dload >= idx->dlist[i].attrs.maxload) {
continue;
}