if the tdmi is running, trust it above all else

This commit is contained in:
Andreas Öman 2007-11-21 15:32:41 +00:00
parent 24dbe9e55a
commit 933b488377

View file

@ -149,20 +149,15 @@ dvb_start_feed(th_transport_t *t, unsigned int weight)
LIST_FOREACH(tdmi, &mux->tdm_instances, tdmi_mux_link) {
if(tdmi->tdmi_state == TDMI_RUNNING)
goto gotmux;
if(tdmi->tdmi_status != NULL)
continue; /* no lock */
if(tdmi->tdmi_fec_err_per_sec > DVB_FEC_ERROR_LIMIT / 3)
continue; /* too much errors to even consider */
if(tdmi->tdmi_state == TDMI_RUNNING)
goto gotmux;
if(tdmi->tdmi_state == TDMI_IDLESCAN) {
tdmi->tdmi_state = TDMI_RUNNING;
goto gotmux;
}
w = transport_compute_weight(&tdmi->tdmi_adapter->tda_transports);
if(w < weight && cand == NULL)
cand = tdmi;