summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-09-16 12:14:06 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-09-16 12:14:06 +0200
commit2d29eb90fe6fe132880e7a1343af0db7443d39c1 (patch)
tree9dfae2cf827d20c6296099ff283b6ad67a3a84d5
parent59b6005a0cd4183fadae703ac7587152612937c0 (diff)
downloadvdr-2d29eb90fe6fe132880e7a1343af0db7443d39c1.tar.gz
vdr-2d29eb90fe6fe132880e7a1343af0db7443d39c1.tar.bz2
Fixed handling video directory updates in case the timestamp of the .update file is in the future
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY4
-rw-r--r--recording.c7
3 files changed, 10 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index f9f4b6af..6d853362 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1819,6 +1819,8 @@ Petri Hintukainen <Petri.Hintukainen@hut.fi>
have been several reports that it causes more problems than it solves
for suggesting to add --remove-destination to the 'cp' command for binaries in
the Makefile to avoid a crash in case a new version is installed on a running system
+ for fixing handling video directory updates in case the timestamp of the .update
+ file is in the future
Marcel Schaeben <mts280@gmx.de>
for his "Easy Input" patch
diff --git a/HISTORY b/HISTORY
index e8ba05f8..d34a712b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4915,7 +4915,7 @@ Video Disk Recorder Revision History
- Implemented a copy constructor for cTimer (thanks to Udo Richter for reporting that
an assignment in svdrp.c didn't use the cTimer::operator=()).
-2006-09-15: Version 1.4.2-3
+2006-09-16: Version 1.4.2-3
- Added --remove-destination to the 'cp' command for binaries in the Makefiles of
the plugins (thanks to Rolf Ahrenberg).
@@ -4924,3 +4924,5 @@ Video Disk Recorder Revision History
- Fixed deleting expired VPS timers (under certain conditions a timer could have been
deleted before it even started recording).
- Updated the Hungarian language texts (thanks to Istvan Koenigsberger and Guido Josten).
+- Fixed handling video directory updates in case the timestamp of the .update file
+ is in the future (thanks to Petri Hintukainen).
diff --git a/recording.c b/recording.c
index fd7800b4..e60c4782 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.149 2006/07/30 10:23:46 kls Exp $
+ * $Id: recording.c 1.150 2006/09/16 12:12:34 kls Exp $
*/
#include "recording.h"
@@ -947,7 +947,10 @@ void cRecordings::TouchUpdate(void)
bool cRecordings::NeedsUpdate(void)
{
- return lastUpdate < LastModifiedTime(UpdateFileName());
+ time_t lastModified = LastModifiedTime(UpdateFileName());
+ if (lastModified > time(NULL))
+ return false; // somebody's clock isn't running correctly
+ return lastUpdate < lastModified;
}
bool cRecordings::Update(bool Wait)