mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
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:
committed by
Jacek Jendrzej
parent
de6e94cb9d
commit
a0cefea55a
@@ -244,6 +244,7 @@ class CCNThread : public CEventsThread
|
||||
private:
|
||||
/* overloaded hooks */
|
||||
void addFilters();
|
||||
bool shouldSleep();
|
||||
void beforeSleep();
|
||||
void beforeWait();
|
||||
void afterWait();
|
||||
@@ -254,6 +255,7 @@ class CCNThread : public CEventsThread
|
||||
OpenThreads::Mutex update_mutex;
|
||||
bool updating;
|
||||
cDemux * eitDmx;
|
||||
int eit_retry;
|
||||
|
||||
void sendCNEvent();
|
||||
public:
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user