summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/eit.c b/eit.c
index 76da2669..22fcf8aa 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.75 2003/05/11 11:25:04 kls Exp $
+ * $Id: eit.c 1.76 2003/05/18 12:51:50 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -1073,6 +1073,7 @@ cSIProcessor::cSIProcessor(const char *FileName)
masterSIProcessor = numSIProcessors == 0; // the first one becomes the 'master'
currentSource = 0;
currentTransponder = 0;
+ statusCount = 0;
pmtIndex = 0;
pmtPid = 0;
filters = NULL;
@@ -1150,6 +1151,7 @@ const char *cSIProcessor::GetEpgDataFileName(void)
void cSIProcessor::SetStatus(bool On)
{
LOCK_THREAD;
+ statusCount++;
ShutDownFilters();
pmtIndex = 0;
pmtPid = 0;
@@ -1176,6 +1178,7 @@ void cSIProcessor::Action()
time_t lastCleanup = time(NULL);
time_t lastPmtScan = time(NULL);
+ int oldStatusCount = 0;
active = true;
while(active)
@@ -1208,6 +1211,7 @@ void cSIProcessor::Action()
}
// set up pfd structures for all active filter
+ Lock();
pollfd pfd[MAX_FILTERS];
int NumUsedFilters = 0;
for (int a = 0; a < MAX_FILTERS ; a++)
@@ -1219,6 +1223,8 @@ void cSIProcessor::Action()
NumUsedFilters++;
}
}
+ oldStatusCount = statusCount;
+ Unlock();
// wait until data becomes ready from the bitfilter
if (poll(pfd, NumUsedFilters, 1000) != 0)
@@ -1239,6 +1245,8 @@ void cSIProcessor::Action()
//dsyslog("Received pid 0x%04X with table ID 0x%02X and length of %4d\n", pid, buf[0], seclen);
cMutexLock MutexLock(&schedulesMutex); // since the xMem... stuff is not thread safe, we need to use a "global" mutex
LOCK_THREAD;
+ if (statusCount != oldStatusCount)
+ break;
switch (pid)
{
case 0x00: