neutrino: stop EIT read before zap

This commit is contained in:
[CST] Focus
2014-09-02 12:59:21 +04:00
parent cac3a87137
commit 3513f9830a
8 changed files with 41 additions and 6 deletions

View File

@@ -968,6 +968,20 @@ static void commandserviceChanged(int connfd, char *data, const unsigned dataLen
dprintf("[sectionsd] commandserviceChanged: Service changed to " PRINTF_CHANNEL_ID_TYPE "\n", uniqueServiceKey);
}
static void commandserviceStopped(int connfd, char * /* data */, const unsigned /* dataLength */)
{
xprintf("[sectionsd] commandserviceStopped\n");
sendEmptyResponse(connfd, NULL, 0);
threadCN.lock();
threadEIT.lock();
threadCN.closefd();
threadEIT.closefd();
threadCN.unlock();
threadEIT.unlock();
threadCN.stopUpdate();
xprintf("[sectionsd] commandserviceStopped done\n");
}
static void commandGetIsScanningActive(int connfd, char* /*data*/, const unsigned /*dataLength*/)
{
struct sectionsd::msgResponseHeader responseHeader;
@@ -1233,6 +1247,7 @@ static s_cmd_table connectionCommands[sectionsd::numberOfCommands] = {
{ commandGetIsScanningActive, "commandGetIsScanningActive" },
{ commandGetIsTimeSet, "commandGetIsTimeSet" },
{ commandserviceChanged, "commandserviceChanged" },
{ commandserviceStopped, "commandserviceStopped" },
{ commandRegisterEventClient, "commandRegisterEventClient" },
{ commandUnRegisterEventClient, "commandUnRegisterEventClient" },
{ commandFreeMemory, "commandFreeMemory" },
@@ -1786,7 +1801,7 @@ void CCNThread::beforeWait()
update_mutex.unlock();
}
void CCNThread::afterWait()
void CCNThread::stopUpdate()
{
xprintf("%s: stop eit update filter (%s)\n", name.c_str(), updating ? "active" : "not active");
update_mutex.lock();
@@ -1797,6 +1812,11 @@ void CCNThread::afterWait()
update_mutex.unlock();
}
void CCNThread::afterWait()
{
stopUpdate();
}
void CCNThread::beforeSleep()
{
if (sendToSleepNow && messaging_have_CN == 0x00) {