소스 검색

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

- GH #2297
Daniel-Constantin Mierla 5 년 전
부모
커밋
0115d3424c
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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;
 		}