summaryrefslogtreecommitdiff
path: root/timers.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-10-31 09:47:14 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2017-10-31 09:47:14 +0100
commit19275aa8bbc3407406d473debf316d0dbe6f45e3 (patch)
tree93328431f7d1aaff7a1665091c93ebe858a4ebb0 /timers.c
parent7bbbfb0dee56942458968e538830a3e5ec785bb5 (diff)
downloadvdr-19275aa8bbc3407406d473debf316d0dbe6f45e3.tar.gz
vdr-19275aa8bbc3407406d473debf316d0dbe6f45e3.tar.bz2
Fixed an invalid lock sequence when trying to remove a deleted recording in case of low disk space; now making sure that AssertFreeDiskSpace() is called with the maximum timer priority in case there are several timers recording with different priorities
Diffstat (limited to 'timers.c')
-rw-r--r--timers.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/timers.c b/timers.c
index 8987b126..bc894cc0 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 4.11 2017/06/25 10:02:09 kls Exp $
+ * $Id: timers.c 4.12 2017/10/31 09:41:31 kls Exp $
*/
#include "timers.h"
@@ -804,6 +804,16 @@ const cTimer *cTimers::GetMatch(const cEvent *Event, eTimerMatch *Match) const
return t;
}
+int cTimers::GetMaxPriority(void) const
+{
+ int n = 0;
+ for (const cTimer *ti = First(); ti; ti = Next(ti)) {
+ if (!ti->Remote() && ti->Recording())
+ n = max(n, ti->Priority());
+ }
+ return n;
+}
+
const cTimer *cTimers::GetNextActiveTimer(void) const
{
const cTimer *t0 = NULL;