aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/scan.cpp
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-11-27 01:01:16 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-11-27 01:01:16 +0000
commit8130c81bb660aa3b036754279d720107b845cfea (patch)
tree956057bba41622c5cd592a015772db6eaedb9d8e /lib/dvb/scan.cpp
parent849192972c9dcc9515ee2637e6ffe2a8790c940a (diff)
downloadenigma2-8130c81bb660aa3b036754279d720107b845cfea.tar.gz
enigma2-8130c81bb660aa3b036754279d720107b845cfea.zip
refuse to stop scan after first invalid NIT in quick mode
Diffstat (limited to 'lib/dvb/scan.cpp')
-rw-r--r--lib/dvb/scan.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp
index 8b895dc9..3c952b8f 100644
--- a/lib/dvb/scan.cpp
+++ b/lib/dvb/scan.cpp
@@ -376,12 +376,13 @@ void eDVBScan::channelDone()
if (m_ready & validNIT)
{
int system;
+ std::list<ePtr<iDVBFrontendParameters> > m_ch_toScan_backup;
m_ch_current->getSystem(system);
SCAN_eDebug("dumping NIT");
if (m_flags & clearToScanOnFirstNIT)
{
+ m_ch_toScan_backup = m_ch_toScan;
m_ch_toScan.clear();
- m_flags &= ~clearToScanOnFirstNIT;
}
std::vector<NetworkInformationSection*>::const_iterator i;
for (i = m_NIT->getSections().begin(); i != m_NIT->getSections().end(); ++i)
@@ -474,9 +475,25 @@ void eDVBScan::channelDone()
break;
}
}
-
}
+
}
+
+ /* a pitfall is to have the clearToScanOnFirstNIT-flag set, and having channels which have
+ no or invalid NIT. this code will not erase the toScan list unless at least one valid entry
+ has been found.
+
+ This is not a perfect solution, as the channel could contain a partial NIT. Life's bad.
+ */
+ if (m_flags & clearToScanOnFirstNIT)
+ {
+ if (m_ch_toScan.empty())
+ {
+ eWarning("clearToScanOnFirstNIT was set, but NIT is invalid. Refusing to stop scan.");
+ m_ch_toScan = m_ch_toScan_backup;
+ } else
+ m_flags &= ~clearToScanOnFirstNIT;
+ }
m_ready &= ~validNIT;
}