diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-09-01 09:20:07 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-09-01 09:20:07 +0200 |
commit | c169e2014130b9b082586bacecdf1377f7bb0f22 (patch) | |
tree | 7c2bb27f7815c50ddba6da011f0363b862b1421f | |
parent | c3a3b70fa04a4c4d73367c4831b8094cc65b4ec6 (diff) | |
download | vdr-2.0.3.tar.gz vdr-2.0.3.tar.bz2 |
Fixed cleaning up old EPG events in case no epg data file is given2.0.3
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | epg.c | 19 |
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 @@ -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). @@ -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; } } |