Kaynağa Gözat

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

- GH #2297
Daniel-Constantin Mierla 5 yıl önce
ebeveyn
işleme
0115d3424c
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  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;
 		}