Browse Source

dispatcher: handle the case of maxload 0 for call load distribution

- GH #2297
Daniel-Constantin Mierla 5 năm trước cách đây
mục cha
commit
0115d3424c
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/modules/dispatcher/dispatch.c

+ 2 - 0
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;
 		}