diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2009-05-15 12:41:50 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2009-05-15 12:41:50 +0200 |
commit | 941c4360e2263623801ad4790876a15249f887bb (patch) | |
tree | fdbad511a8a4507673d27840f89788f7646f8da2 /eit.c | |
parent | e81b822a5f13058c7edb90933b68bbb7059c11d3 (diff) | |
download | vdr-941c4360e2263623801ad4790876a15249f887bb.tar.gz vdr-941c4360e2263623801ad4790876a15249f887bb.tar.bz2 |
EIT events are now only processed if a plausible system time is available, to avoid wrong handling of PDC descriptors
Diffstat (limited to 'eit.c')
-rw-r--r-- | eit.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -8,7 +8,7 @@ * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>. * - * $Id: eit.c 2.4 2009/05/10 14:47:31 kls Exp $ + * $Id: eit.c 2.5 2009/05/15 12:34:43 kls Exp $ */ #include "eit.h" @@ -17,6 +17,8 @@ #include "libsi/section.h" #include "libsi/descriptor.h" +#define VALID_TIME (31536000 * 2) // two years + // --- cEIT ------------------------------------------------------------------ class cEIT : public SI::EIT { @@ -46,6 +48,9 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo struct tm tm_r; struct tm t = *localtime_r(&Now, &tm_r); // this initializes the time zone in 't' + if (Now < VALID_TIME) + return; // we need the current time for handling PDC descriptors + SI::EIT::Event SiEitEvent; for (SI::Loop::Iterator it; eventLoop.getNext(SiEitEvent, it); ) { bool ExternalData = false; |