summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-05-06 14:00:45 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-05-06 14:00:45 +0200
commit6ca56047ae0f8078629b12f5e7408b0c57b9fec6 (patch)
tree8f2bb77381f3bdb1d6135234141931aea95987dc /recording.c
parentb3c1f1bb7362825f0bb08dbae11b28d2d74649ae (diff)
downloadvdr-6ca56047ae0f8078629b12f5e7408b0c57b9fec6.tar.gz
vdr-6ca56047ae0f8078629b12f5e7408b0c57b9fec6.tar.bz2
Fixed handling lifetime when deciding whether to delete a recording
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/recording.c b/recording.c
index e50dfcb7..dde2ee38 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.96 2005/02/12 10:17:47 kls Exp $
+ * $Id: recording.c 1.97 2005/05/06 14:00:23 kls Exp $
*/
#include "recording.h"
@@ -126,7 +126,7 @@ void AssertFreeDiskSpace(int Priority)
while (r) {
if (!r->IsEdited() && r->lifetime < MAXLIFETIME) { // edited recordings and recordings with MAXLIFETIME live forever
if ((r->lifetime == 0 && Priority > r->priority) || // the recording has no guaranteed lifetime and the new recording has higher priority
- (time(NULL) - r->start) / SECSINDAY > r->lifetime) { // the recording's guaranteed lifetime has expired
+ (r->lifetime > 0 && (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)