summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY4
-rw-r--r--timers.c21
2 files changed, 15 insertions, 10 deletions
diff --git a/HISTORY b/HISTORY
index ee29436f..2900a737 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7272,7 +7272,7 @@ Video Disk Recorder Revision History
".keep" to prevent a directory from being deleted when it is empty. Currently the
only file name that is ignored is ".sort".
-2012-10-15: Version 1.7.32
+2012-10-16: Version 1.7.32
- Pressing the Play key during normal live viewing mode now opens the Recordings menu
if there is no "last viewed" recording (thanks to Alexander Wenzel).
@@ -7303,3 +7303,5 @@ Video Disk Recorder Revision History
closer).
- Fixed a possible memory leak in SI::StructureLoop::getNextAsPointer() (reported by
Sundararaj Reel).
+- Fixed handling timers in case an event is modified and "phased out" while the timer
+ is recording.
diff --git a/timers.c b/timers.c
index b5678f90..a29cf12f 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 2.13 2012/10/13 14:16:22 kls Exp $
+ * $Id: timers.c 2.14 2012/10/16 08:22:39 kls Exp $
*/
#include "timers.h"
@@ -465,10 +465,11 @@ bool cTimer::Matches(time_t t, bool Directly, int Margin) const
startTime = event->StartTime();
stopTime = event->EndTime();
if (!Margin) { // this is an actual check
- if (event->Schedule()->PresentSeenWithin(EITPRESENTFOLLOWINGRATE)) // VPS control can only work with up-to-date events...
- return event->IsRunning(true);
- else
- return startTime <= t && t < stopTime; // ...otherwise we fall back to normal timer handling
+ if (event->Schedule()->PresentSeenWithin(EITPRESENTFOLLOWINGRATE)) { // VPS control can only work with up-to-date events...
+ if (event->StartTime() > 0) // checks for "phased out" events
+ return event->IsRunning(true);
+ }
+ return startTime <= t && t < stopTime; // ...otherwise we fall back to normal timer handling
}
}
}
@@ -549,10 +550,12 @@ void cTimer::SetEventFromSchedule(const cSchedules *Schedules)
lastSetEvent = now;
const cEvent *Event = NULL;
if (HasFlags(tfVps) && Schedule->Events()->First()->Vps()) {
- if (event && Recording())
- return; // let the recording end first
- if (event && (now <= event->EndTime() || Matches(0, true)))
- return; // stay with the old event until the timer has completely expired
+ if (event && event->StartTime() > 0) { // checks for "phased out" events
+ if (Recording())
+ return; // let the recording end first
+ if (now <= event->EndTime() || Matches(0, true))
+ return; // stay with the old event until the timer has completely expired
+ }
// VPS timers only match if their start time exactly matches the event's VPS time:
for (const cEvent *e = Schedule->Events()->First(); e; e = Schedule->Events()->Next(e)) {
if (e->StartTime() && e->RunningStatus() != SI::RunningStatusNotRunning) { // skip outdated events