From c7ce1c37e34bce2b945fb484e3f20fcec1fac19c Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 16 Jan 2009 15:59:47 +0100 Subject: [PATCH] Fixed removing deleted recordings in case there is a problem --- CONTRIBUTORS | 1 + HISTORY | 4 ++++ recording.c | 7 ++++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a10a9b41..335c5711 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1192,6 +1192,7 @@ Reinhard Nissl for fixing cPatPmtParser::ParsePmt() to reset vpid and vtype when switching from a video to an audio channel for fixing returning complete PES packets in cTsToPes::GetPes() + for reporting a possible problem with removing deleted recordings Richard Robson for reporting freezing replay if a timer starts while in Transfer Mode from the diff --git a/HISTORY b/HISTORY index 5b1b86b4..58756a34 100644 --- a/HISTORY +++ b/HISTORY @@ -5931,3 +5931,7 @@ Video Disk Recorder Revision History - Added clearing the TS buffers in cDevice::Detach() (thanks to Marco Schlüßler). - Fixed incrementing the continuity counter in cPatPmtGenerator::GetPmt() (thanks to Johann Friedrichs). +- Fixed removing deleted recordings in case there is a problem. Once a recording + caused a problem with removing, no others were removed any more and an ongoing + recording could fill up the disk and cause other recordings to be deleted + automatically (reported by Reinhard Nissl). diff --git a/recording.c b/recording.c index 2948343c..fcd49554 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 2.4 2009/01/06 14:41:11 kls Exp $ + * $Id: recording.c 2.5 2009/01/16 15:55:18 kls Exp $ */ #include "recording.h" @@ -154,9 +154,10 @@ void AssertFreeDiskSpace(int Priority, bool Force) } r = DeletedRecordings.Next(r); } - if (r0 && r0->Remove()) { + if (r0) { + if (r0->Remove()) + LastFreeDiskCheck += REMOVELATENCY / Factor; DeletedRecordings.Del(r0); - LastFreeDiskCheck += REMOVELATENCY / Factor; return; } }