summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-06-12 15:32:47 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-06-12 15:32:47 +0200
commitf585f21583e3c72a24a47682be0ebdb70056be96 (patch)
tree8771395f336d3f2a62bf09b84a4f64163a38e0b9 /recording.c
parent47c5bd66a8d652d8dab18cd8c32c0bc0fd07f2db (diff)
downloadvdr-f585f21583e3c72a24a47682be0ebdb70056be96.tar.gz
vdr-f585f21583e3c72a24a47682be0ebdb70056be96.tar.bz2
Fixed removing recordings with Lifetime = 99
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/recording.c b/recording.c
index 2802c5b0..6b35ef29 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.30 2001/06/02 10:07:01 kls Exp $
+ * $Id: recording.c 1.31 2001/06/12 15:31:32 kls Exp $
*/
#define _GNU_SOURCE
@@ -94,16 +94,16 @@ void AssertFreeDiskSpace(int Priority)
cRecording *r = Recordings.First();
cRecording *r0 = NULL;
while (r) {
- if (r->lifetime == MAXLIFETIME)
- continue; // recordings with MAXLIFETIME live forever
- if ((r->lifetime == 0 && Priority > r->priority) || // the recording has guaranteed lifetime and the new recording has higher priority
- (time(NULL) - r->start) / SECSINDAY > r->lifetime) { // the recording's guaranteed lifetime has expired
- if (r0) {
- if (r->priority < r0->priority || (r->priority == r0->priority && r->start < r0->start))
- r0 = r; // in any case we delete the one with the lowest priority (or the older one in case of equal priorities)
+ if (r->lifetime < MAXLIFETIME) { // recordings with MAXLIFETIME live forever
+ if ((r->lifetime == 0 && Priority > r->priority) || // the recording has guaranteed lifetime and the new recording has higher priority
+ (time(NULL) - r->start) / SECSINDAY > r->lifetime) { // the recording's guaranteed lifetime has expired
+ if (r0) {
+ if (r->priority < r0->priority || (r->priority == r0->priority && r->start < r0->start))
+ r0 = r; // in any case we delete the one with the lowest priority (or the older one in case of equal priorities)
+ }
+ else
+ r0 = r;
}
- else
- r0 = r;
}
r = Recordings.Next(r);
}