summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-12-26 15:10:27 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-12-26 15:10:27 +0100
commit1e121f6eedf0aef19dfdc1371d9e1fa919b1576d (patch)
treee22cb83994bef5f3dcf810d8e8408ee4703c9574 /epg.c
parent2d5f3497bf9799f8ffe15795f6e91bf643e35589 (diff)
downloadvdr-1e121f6eedf0aef19dfdc1371d9e1fa919b1576d.tar.gz
vdr-1e121f6eedf0aef19dfdc1371d9e1fa919b1576d.tar.bz2
Schedules are now cleaned up once every hour (not only at 05:00)
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epg.c b/epg.c
index 3407f34f..6496db17 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 1.44 2005/12/26 15:09:03 kls Exp $
+ * $Id: epg.c 1.45 2005/12/26 15:10:27 kls Exp $
*/
#include "epg.h"
@@ -890,7 +890,7 @@ void cSchedules::Cleanup(bool Force)
time_t now = time(NULL);
struct tm tm_r;
struct tm *ptm = localtime_r(&now, &tm_r);
- if (now - lastCleanup > 3600 && ptm->tm_hour == 5) {
+ if (now - lastCleanup > 3600) {
isyslog("cleaning up schedules data");
cSchedulesLock SchedulesLock(true, 1000);
cSchedules *s = (cSchedules *)Schedules(SchedulesLock);
@@ -899,7 +899,8 @@ void cSchedules::Cleanup(bool Force)
p->Cleanup(now);
}
lastCleanup = now;
- ReportEpgBugFixStats(true);
+ if (ptm->tm_hour == 5)
+ ReportEpgBugFixStats(true);
}
if (epgDataFileName && now - lastDump > 600) {
cSafeFile f(epgDataFileName);