eitd/sectionsd.cpp: try to fix messaging_zap_detected flag

This commit is contained in:
[CST] Focus
2013-12-21 14:03:23 +04:00
parent f3fdbca8cd
commit c57f0385c6

View File

@@ -636,7 +636,7 @@ static void removeOldEvents(const long seconds)
deleteEvent(*i); deleteEvent(*i);
readLockEvents(); readLockEvents();
printf("[sectionsd] Removed %d old events (%d left).\n", (int)(total_events - mySIeventsOrderUniqueKey.size()), (int)mySIeventsOrderUniqueKey.size()); xprintf("[sectionsd] Removed %d old events (%d left), zap detected %d.\n", (int)(total_events - mySIeventsOrderUniqueKey.size()), (int)mySIeventsOrderUniqueKey.size(), messaging_zap_detected);
unlockEvents(); unlockEvents();
return; return;
} }
@@ -859,6 +859,9 @@ static void commandPauseScanning(int connfd, char *data, const unsigned dataLeng
#endif #endif
#endif #endif
scanning = 0; scanning = 0;
writeLockMessaging();
messaging_zap_detected = false;
unlockMessaging();
} }
else if (!pause && !scanning) else if (!pause && !scanning)
{ {
@@ -882,6 +885,7 @@ static void commandPauseScanning(int connfd, char *data, const unsigned dataLeng
writeLockMessaging(); writeLockMessaging();
messaging_have_CN = 0x00; messaging_have_CN = 0x00;
messaging_got_CN = 0x00; messaging_got_CN = 0x00;
messaging_zap_detected = true;
unlockMessaging(); unlockMessaging();
scanning = 1; scanning = 1;
@@ -909,6 +913,9 @@ static void commandserviceChanged(int connfd, char *data, const unsigned dataLen
if (cmd->dnum) { if (cmd->dnum) {
/* dont wakeup EIT, if we have max events allready */ /* dont wakeup EIT, if we have max events allready */
if (max_events == 0 || (mySIeventsOrderUniqueKey.size() < max_events)) { if (max_events == 0 || (mySIeventsOrderUniqueKey.size() < max_events)) {
writeLockMessaging();
messaging_zap_detected = true;
unlockMessaging();
threadEIT.setDemux(cmd->dnum); threadEIT.setDemux(cmd->dnum);
threadEIT.setCurrentService(uniqueServiceKey); threadEIT.setCurrentService(uniqueServiceKey);
} }