summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-09-15 15:01:40 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-09-15 15:01:40 +0200
commitfd4ffed37bea7e196e49350741276339f92d51ee (patch)
tree2b43e6b660cdda09a79a3e908645479305bb3cb2
parent1b79274fae752076ffa13d4f43a698fefb68b3c6 (diff)
downloadvdr-fd4ffed37bea7e196e49350741276339f92d51ee.tar.gz
vdr-fd4ffed37bea7e196e49350741276339f92d51ee.tar.bz2
Fixed deleting expired VPS timers
-rw-r--r--HISTORY4
-rw-r--r--timers.c10
2 files changed, 5 insertions, 9 deletions
diff --git a/HISTORY b/HISTORY
index cd3c6d00..9188873c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4915,9 +4915,11 @@ 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-09: Version 1.4.2-3
+2006-09-15: Version 1.4.2-3
- Added --remove-destination to the 'cp' command for binaries in the Makefiles of
the plugins (thanks to Rolf Ahrenberg).
- The 'skincurses' plugin now adjusts the size of the OSD to the size of the console
window.
+- Fixed deleting expired VPS timers (under certain conditions a timer could have been
+ deleted before it even started recording).
diff --git a/timers.c b/timers.c
index 18dab0ff..069b8578 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.64 2006/09/08 15:06:09 kls Exp $
+ * $Id: timers.c 1.65 2006/09/15 14:15:53 kls Exp $
*/
#include "timers.h"
@@ -438,13 +438,7 @@ int cTimer::Matches(const cEvent *Event, int *Overlap) const
bool cTimer::Expired(void) const
{
- if (IsSingleEvent() && !Recording() && StopTime() + EXPIRELATENCY <= time(NULL)) {
- if (HasFlags(tfVps) && event && event->Vps())
- return event->RunningStatus() == SI::RunningStatusNotRunning;
- else
- return true;
- }
- return false;
+ return IsSingleEvent() && !Recording() && StopTime() + EXPIRELATENCY <= time(NULL) && (!HasFlags(tfVps) || !event);
}
time_t cTimer::StartTime(void) const