mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +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.
This commit is contained in:
@@ -244,6 +244,7 @@ class CCNThread : public CEventsThread
|
|||||||
private:
|
private:
|
||||||
/* overloaded hooks */
|
/* overloaded hooks */
|
||||||
void addFilters();
|
void addFilters();
|
||||||
|
bool shouldSleep();
|
||||||
void beforeSleep();
|
void beforeSleep();
|
||||||
void beforeWait();
|
void beforeWait();
|
||||||
void afterWait();
|
void afterWait();
|
||||||
@@ -254,6 +255,7 @@ class CCNThread : public CEventsThread
|
|||||||
OpenThreads::Mutex update_mutex;
|
OpenThreads::Mutex update_mutex;
|
||||||
bool updating;
|
bool updating;
|
||||||
cDemux * eitDmx;
|
cDemux * eitDmx;
|
||||||
|
int eit_retry;
|
||||||
|
|
||||||
void sendCNEvent();
|
void sendCNEvent();
|
||||||
public:
|
public:
|
||||||
|
@@ -1599,6 +1599,23 @@ bool CEventsThread::addEvents()
|
|||||||
return true;
|
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 */
|
/* default check if thread should go to sleep */
|
||||||
bool CEventsThread::shouldSleep()
|
bool CEventsThread::shouldSleep()
|
||||||
{
|
{
|
||||||
@@ -1672,6 +1689,7 @@ CCNThread::CCNThread()
|
|||||||
|
|
||||||
updating = false;
|
updating = false;
|
||||||
eitDmx = new cDemux(0);
|
eitDmx = new cDemux(0);
|
||||||
|
eit_retry = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CN thread hooks */
|
/* CN thread hooks */
|
||||||
@@ -1737,6 +1755,7 @@ void CCNThread::beforeSleep()
|
|||||||
/* send a "no epg" event anyway before going to sleep */
|
/* send a "no epg" event anyway before going to sleep */
|
||||||
sendCNEvent();
|
sendCNEvent();
|
||||||
}
|
}
|
||||||
|
eit_retry = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCNThread::processSection()
|
void CCNThread::processSection()
|
||||||
|
Reference in New Issue
Block a user