From: Adam Sutton Date: Fri, 10 May 2013 14:10:54 +0000 (+0100) Subject: dvb: fix mistake in NIT processing. X-Git-Tag: 3.4patch1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da3ca5cdf58eab5af63cbd37ef3eed112267d798;p=thirdparty%2Ftvheadend.git dvb: fix mistake in NIT processing. This was stopping some DVB-C networks from being properly scanned. (cherry picked from commit 84c1c05d73232d4d0e34bbd587892bb019f0abb5) --- diff --git a/src/dvb/dvb_tables.c b/src/dvb/dvb_tables.c index 505176e11..0441f6fbc 100644 --- a/src/dvb/dvb_tables.c +++ b/src/dvb/dvb_tables.c @@ -881,13 +881,13 @@ dvb_nit_callback(th_dvb_mux_instance_t *tdmi, uint8_t *ptr, int len, hexdump("nit", ptr, len); #endif - /* Ignore other network */ - if(tableid != 0x40) return -1; - - /* Check NID */ - if(tdmi->tdmi_adapter->tda_nitoid && - tdmi->tdmi_adapter->tda_nitoid != network_id) - return -1; + /* Specific NID requested */ + if(tdmi->tdmi_adapter->tda_nitoid) { + if (tdmi->tdmi_adapter->tda_nitoid != network_id) + return -1; + } else if (tableid != 0x40) { + return -1; + } /* Ignore non-current */ if((ptr[2] & 1) == 0)