From 09c6bced8db2567c60896457e4b7e761f37d87c3 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 7 Oct 2006 12:50:24 +0200 Subject: Fixed handling video directory updates in case an other process has touched the .update file after the last NeedsUpdate() check --- CONTRIBUTORS | 2 ++ HISTORY | 2 ++ recording.c | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index ab8742ec..be608e76 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1823,6 +1823,8 @@ Petri Hintukainen 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 + for fixing handling video directory updates in case an other process has touched the + .update file after the last NeedsUpdate() check Marcel Schaeben for his "Easy Input" patch diff --git a/HISTORY b/HISTORY index 1f0d0ddb..0b680988 100644 --- a/HISTORY +++ b/HISTORY @@ -4943,3 +4943,5 @@ Video Disk Recorder Revision History Juza for reporting that events without an ExtendedEventDescriptor may get duplicate information in their ShortText through the EPG bugfixes in case they are received again). +- Fixed handling video directory updates in case an other process has touched the + .update file after the last NeedsUpdate() check (thanks to Petri Hintukainen). diff --git a/recording.c b/recording.c index e60c4782..5298de3f 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.150 2006/09/16 12:12:34 kls Exp $ + * $Id: recording.c 1.151 2006/10/07 12:46:22 kls Exp $ */ #include "recording.h" @@ -941,8 +941,10 @@ bool cRecordings::StateChanged(int &State) void cRecordings::TouchUpdate(void) { + bool needsUpdate = NeedsUpdate(); TouchFile(UpdateFileName()); - lastUpdate = time(NULL); // make sure we don't tigger ourselves + if (!needsUpdate) + lastUpdate = time(NULL); // make sure we don't tigger ourselves } bool cRecordings::NeedsUpdate(void) -- cgit v1.2.3