From 0115d3424c0f8780a661882527f39b2b39d0e74e Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Thu, 23 Apr 2020 19:04:58 +0200 Subject: [PATCH] dispatcher: handle the case of maxload 0 for call load distribution - GH #2297 --- src/modules/dispatcher/dispatch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index 6ded0120853..004bb0cfae4 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; }