sectionsd: retry getting eit_version

Sometimes at first start, the cn thread does not fetch the EIT version
and thus automatic updates don't work. The cause of this is not 100%
clear, for now let's add a workaround to try a bit longer fetching it.

Signed-off-by: Jacek Jendrzej <crashdvb@googlemail.com>
This commit is contained in:
Stefan Seyfried
2013-02-17 17:36:19 +01:00
committed by Jacek Jendrzej
parent de6e94cb9d
commit a0cefea55a
2 changed files with 21 additions and 0 deletions

View File

@@ -1575,6 +1575,23 @@ bool CEventsThread::addEvents()
return true;
}
bool CCNThread::shouldSleep()
{
if (!scanning || channel_is_blacklisted)
return true;
if (!sendToSleepNow)
return false;
if (eit_version != 0xff)
return true;
if (++eit_retry > 1) {
xprintf("%s::%s eit_retry > 1 (%d) -> going to sleep\n", name.c_str(), __func__, eit_retry);
return true;
}
sendToSleepNow = false;
return false;
}
/* default check if thread should go to sleep */
bool CEventsThread::shouldSleep()
{
@@ -1648,6 +1665,7 @@ CCNThread::CCNThread()
updating = false;
eitDmx = new cDemux(0);
eit_retry = 0;
}
/* CN thread hooks */
@@ -1713,6 +1731,7 @@ void CCNThread::beforeSleep()
/* send a "no epg" event anyway before going to sleep */
sendCNEvent();
}
eit_retry = 0;
}
void CCNThread::processSection()