From 7673d5124a00988b5b72c9b4a9e97c9df63454c2 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 9 Sep 2005 15:28:26 +0200 Subject: Fixed defining timers that only differ in the day of week --- CONTRIBUTORS | 3 +++ HISTORY | 2 ++ timers.c | 7 +++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index c027b277..2bc10d7a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1474,3 +1474,6 @@ Harald Milz Marko Mäkelä for making repeat keys be ignored when waiting for a keypress to cancel an operation + +Patrick Rother + for reporting a bug in defining timers that only differ in the day of week diff --git a/HISTORY b/HISTORY index 250edf8d..0fe55bd7 100644 --- a/HISTORY +++ b/HISTORY @@ -3800,3 +3800,5 @@ Video Disk Recorder Revision History - Fixed some typos in MANUAL (thanks to Ville Skyttä). - Fixed the default value for "Setup/EPG bugfix level" (thanks to Ville Skyttä for reporting this one). +- Fixed defining timers that only differ in the day of week (thanks to Patrick + Rother for reporting this one). diff --git a/timers.c b/timers.c index c95d367e..ff51f109 100644 --- a/timers.c +++ b/timers.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.c 1.35 2005/09/04 10:53:21 kls Exp $ + * $Id: timers.c 1.36 2005/09/09 15:22:33 kls Exp $ */ #include "timers.h" @@ -519,7 +519,10 @@ cTimers::cTimers(void) cTimer *cTimers::GetTimer(cTimer *Timer) { for (cTimer *ti = First(); ti; ti = Next(ti)) { - if (ti->Channel() == Timer->Channel() && ti->Day() == Timer->Day() && ti->Start() == Timer->Start() && ti->Stop() == Timer->Stop()) + if (ti->Channel() == Timer->Channel() && + (ti->WeekDays() && ti->WeekDays() == Timer->WeekDays() || !ti->WeekDays() && ti->Day() == Timer->Day()) && + ti->Start() == Timer->Start() && + ti->Stop() == Timer->Stop()) return ti; } return NULL; -- cgit v1.2.3