From: Adam Sutton Date: Wed, 25 Jul 2012 14:18:46 +0000 (+0100) Subject: Reject muxes that fail to tune (almost always out of range due to bad autodiscovery... X-Git-Tag: 3.0^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Frelease%2F3.0;p=thirdparty%2Ftvheadend.git Reject muxes that fail to tune (almost always out of range due to bad autodiscovery) and ensure this is also locked in initial scan stats. --- diff --git a/src/dvb/dvb_fe.c b/src/dvb/dvb_fe.c index 9e7b78909..e122b1c3d 100644 --- a/src/dvb/dvb_fe.c +++ b/src/dvb/dvb_fe.c @@ -496,6 +496,15 @@ dvb_fe_tune(th_dvb_mux_instance_t *tdmi, const char *reason) tvhlog(LOG_ERR, "dvb", "\"%s\" tuning to \"%s\"" " -- Front configuration failed -- %s, frequency: %ld", tda->tda_rootpath, buf, strerror(errno), p->frequency); + + /* Remove from initial scan set */ + if(tdmi->tdmi_table_initial) { + tdmi->tdmi_table_initial = 0; + tda->tda_initial_num_mux--; + } + + /* Mark as bad */ + tdmi->tdmi_enabled = 0; return SM_CODE_TUNING_FAILED; }