From 9239d3e6dfce588aa87e73480b08f6616570e87a Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 25 Aug 2002 10:59:49 +0200 Subject: [PATCH] Fixed handling one-shot timers that were already recording and had their start time changed into the future --- CONTRIBUTORS | 2 ++ HISTORY | 3 +++ menu.c | 6 ++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 1428070b..ca9a31ae 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -55,6 +55,8 @@ Matthias Schniedermeyer for his "master-timer" tool for helping to debug the "move to last position in list" bug for suggesting the SVDRP command CLRE + for reporting a bug in handling one-shot timers that were already recording + and had their start time changed into the future Miha Setina for translating OSD texts to the Slovenian language diff --git a/HISTORY b/HISTORY index 9f99066b..fd175766 100644 --- a/HISTORY +++ b/HISTORY @@ -1427,3 +1427,6 @@ Video Disk Recorder Revision History a cPalette (see osdbase.h). - The new SVDRP command CLRE can be used to clear the entire EPG data (suggested by Matthias Schniedermeyer). +- Fixed handling one-shot timers that were already recording and had their start + time changed into the future (thanks to Matthias Schniedermeyer for reporting + this one). diff --git a/menu.c b/menu.c index 5b56b3ab..ea10a361 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.205 2002/08/15 11:28:08 kls Exp $ + * $Id: menu.c 1.206 2002/08/25 10:56:09 kls Exp $ */ #include "menu.h" @@ -2490,9 +2490,7 @@ void cRecordControl::Stop(bool KeepInstant) cStatus::MsgRecording(device, NULL); DELETENULL(recorder); timer->SetRecording(false); - if ((IsInstant() && !KeepInstant) || (timer->IsSingleEvent() && !timer->Matches())) { - // checking timer->Matches() to make sure we don't delete the timer - // if the program was cancelled before the timer's stop time! + if ((IsInstant() && !KeepInstant) || (timer->IsSingleEvent() && timer->StopTime() <= time(NULL))) { isyslog("deleting timer %d", timer->Index() + 1); Timers.Del(timer); Timers.Save();