1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed cTimers::GetNextActiveTimer() so that it won't return an expired timer

This commit is contained in:
Klaus Schmidinger 2006-01-28 15:10:27 +01:00
parent b395bd614a
commit a0f12dbc79
3 changed files with 5 additions and 2 deletions

View File

@ -941,6 +941,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
for reporting a crash in the Schedule menu with events that have no title for reporting a crash in the Schedule menu with events that have no title
for a patch that was used to implement automatic cursor advance when entering text for a patch that was used to implement automatic cursor advance when entering text
via the numeric keys via the numeric keys
for reporting a problem with expired timers when shutting down via the Power key
Ralf Klueber <ralf.klueber@vodafone.com> Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark for reporting a bug in cutting a recording if there is only a single editing mark

View File

@ -4255,3 +4255,5 @@ Video Disk Recorder Revision History
recent driver/firmware versions. recent driver/firmware versions.
- The epg.data file is now written when VDR exits (suggested by Daniel Karsubka). - The epg.data file is now written when VDR exits (suggested by Daniel Karsubka).
- There is now a log message when VDR writes the epg.data file. - There is now a log message when VDR writes the epg.data file.
- Fixed cTimers::GetNextActiveTimer() so that it won't return an expired timer
(reported by Rolf Ahrenberg).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: timers.c 1.44 2006/01/27 15:35:17 kls Exp $ * $Id: timers.c 1.45 2006/01/28 15:09:05 kls Exp $
*/ */
#include "timers.h" #include "timers.h"
@ -567,7 +567,7 @@ cTimer *cTimers::GetNextActiveTimer(void)
{ {
cTimer *t0 = NULL; cTimer *t0 = NULL;
for (cTimer *ti = First(); ti; ti = Next(ti)) { for (cTimer *ti = First(); ti; ti = Next(ti)) {
if ((ti->HasFlags(tfActive)) && (!t0 || ti->Compare(*t0) < 0)) if ((ti->HasFlags(tfActive)) && (!t0 || ti->StopTime() > time(NULL) && ti->Compare(*t0) < 0))
t0 = ti; t0 = ti;
} }
return t0; return t0;