summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-09-01 09:20:07 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2013-09-01 09:20:07 +0200
commitc169e2014130b9b082586bacecdf1377f7bb0f22 (patch)
tree7c2bb27f7815c50ddba6da011f0363b862b1421f
parentc3a3b70fa04a4c4d73367c4831b8094cc65b4ec6 (diff)
downloadvdr-c169e2014130b9b082586bacecdf1377f7bb0f22.tar.gz
vdr-c169e2014130b9b082586bacecdf1377f7bb0f22.tar.bz2
Fixed cleaning up old EPG events in case no epg data file is given2.0.3
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY4
-rw-r--r--epg.c19
3 files changed, 15 insertions, 9 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index ee3785a7..b749d083 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2957,6 +2957,7 @@ Johan Andersson <jna@jna.pp.se>
Dave Pickles <dave@pickles.me.uk>
for adding support for "content identifier descriptor" and "default authority
descriptor" to 'libsi'
+ for reporting that old EPG events are not cleaned up in case no epg data file is given
Holger Dengler <holger.dengler@gmx.de>
for making the isnumber() function check the given pointer for NULL
diff --git a/HISTORY b/HISTORY
index 4a7f8e7c..05109534 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7813,7 +7813,7 @@ Video Disk Recorder Revision History
- Fixed a crash in the LCARS skin's main menu in case there is no current channel
(reported by Dominique Dumont).
-2013-08-23: Version 2.0.3
+2013-09-01: Version 2.0.3
- Fixed asserting free disk space in the cutter.
- No longer trying to delete old recordings in AssertFreeDiskSpace() if the given
@@ -7829,3 +7829,5 @@ Video Disk Recorder Revision History
- All bonded devices (except for the master) now turn off their LNB power completely
to avoid problems when receiving vertically polarized transponders (suggested by
Manfred Völkel and Oliver Endriss).
+- Fixed cleaning up old EPG events in case no epg data file is given (reported by
+ Dave Pickles).
diff --git a/epg.c b/epg.c
index 5fb49ae4..ce7e7f8e 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 2.23 2013/02/17 14:12:07 kls Exp $
+ * $Id: epg.c 2.23.1.1 2013/09/01 09:16:53 kls Exp $
*/
#include "epg.h"
@@ -1140,16 +1140,19 @@ bool cSchedule::Read(FILE *f, cSchedules *Schedules)
class cEpgDataWriter : public cThread {
private:
cMutex mutex;
+ bool dump;
protected:
virtual void Action(void);
public:
cEpgDataWriter(void);
+ void SetDump(bool Dump) { dump = Dump; }
void Perform(void);
};
cEpgDataWriter::cEpgDataWriter(void)
:cThread("epg data writer", true)
{
+ dump = false;
}
void cEpgDataWriter::Action(void)
@@ -1169,7 +1172,8 @@ void cEpgDataWriter::Perform(void)
p->Cleanup(now);
}
}
- cSchedules::Dump();
+ if (dump)
+ cSchedules::Dump();
}
static cEpgDataWriter EpgDataWriter;
@@ -1203,6 +1207,7 @@ void cSchedules::SetEpgDataFileName(const char *FileName)
{
free(epgDataFileName);
epgDataFileName = FileName ? strdup(FileName) : NULL;
+ EpgDataWriter.SetDump(epgDataFileName != NULL);
}
void cSchedules::SetModified(cSchedule *Schedule)
@@ -1217,12 +1222,10 @@ void cSchedules::Cleanup(bool Force)
lastDump = 0;
time_t now = time(NULL);
if (now - lastDump > EPGDATAWRITEDELTA) {
- if (epgDataFileName) {
- if (Force)
- EpgDataWriter.Perform();
- else if (!EpgDataWriter.Active())
- EpgDataWriter.Start();
- }
+ if (Force)
+ EpgDataWriter.Perform();
+ else if (!EpgDataWriter.Active())
+ EpgDataWriter.Start();
lastDump = now;
}
}