dispatcher: handle the case of maxload 0 for call load distribution
authorDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 23 Apr 2020 17:04:58 +0000 (19:04 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 23 Apr 2020 17:04:58 +0000 (19:04 +0200)
- GH #2297

src/modules/dispatcher/dispatch.c

index 6ded012..004bb0c 100644 (file)
@@ -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;
                }