summaryrefslogtreecommitdiff
path: root/timers.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-02-03 15:25:51 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-02-03 15:25:51 +0100
commit5cd7945ab5ed051e17097d30e8b1f6c11d656567 (patch)
tree77a04fd500659997a6e269dc7d8599ce8fc30378 /timers.c
parent881c251bea7db28273d38547447a7a22eaa0519b (diff)
downloadvdr-5cd7945ab5ed051e17097d30e8b1f6c11d656567.tar.gz
vdr-5cd7945ab5ed051e17097d30e8b1f6c11d656567.tar.bz2
Fixed handling "pending" timers that blocked others that actually could record
Diffstat (limited to 'timers.c')
-rw-r--r--timers.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/timers.c b/timers.c
index ab426802..e5b9ea61 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.45 2006/01/28 15:09:05 kls Exp $
+ * $Id: timers.c 1.46 2006/02/03 15:20:14 kls Exp $
*/
#include "timers.h"
@@ -535,13 +535,22 @@ cTimer *cTimers::GetTimer(cTimer *Timer)
cTimer *cTimers::GetMatch(time_t t)
{
+ static int LastPending = -1;
cTimer *t0 = NULL;
for (cTimer *ti = First(); ti; ti = Next(ti)) {
if (!ti->Recording() && ti->Matches(t)) {
+ if (ti->Pending()) {
+ if (ti->Index() > LastPending)
+ LastPending = ti->Index();
+ else
+ continue;
+ }
if (!t0 || ti->Priority() > t0->Priority())
t0 = ti;
}
}
+ if (!t0)
+ LastPending = -1;
return t0;
}