Module: kamailio
Branch: 5.3
Commit: 0df6a22015d48a57a91ac4b34411fad0a7272179
URL:
https://github.com/kamailio/kamailio/commit/0df6a22015d48a57a91ac4b34411fad…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-04-23T19:06:18+02:00
dispatcher: handle the case of maxload 0 for call load distribution
- GH #2297
(cherry picked from commit 0115d3424c0f8780a661882527f39b2b39d0e74e)
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0df6a22015d48a57a91ac4b34411fad…
Patch:
https://github.com/kamailio/kamailio/commit/0df6a22015d48a57a91ac4b34411fad…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index ecbfa71433..aaa7b4a2d5 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -2247,6 +2247,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;
}
@@ -2268,6 +2269,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;
}