1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Only calling AssertFreeDiskSpace() with 'Force' if timer is not pending

This commit is contained in:
Klaus Schmidinger 2006-01-21 10:02:19 +01:00
parent 611656bf46
commit d1668d768c

8
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 1.398 2006/01/20 17:19:46 kls Exp $ * $Id: menu.c 1.399 2006/01/21 10:02:19 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -3524,8 +3524,10 @@ bool cRecordControls::Start(cTimer *Timer, bool Pause)
{ {
static time_t LastNoDiskSpaceMessage = 0; static time_t LastNoDiskSpaceMessage = 0;
int FreeMB = 0; int FreeMB = 0;
if (Timer) if (Timer) {
AssertFreeDiskSpace(Timer->Priority(), true); AssertFreeDiskSpace(Timer->Priority(), !Timer->Pending());
Timer->SetPending(true);
}
VideoDiskSpace(&FreeMB); VideoDiskSpace(&FreeMB);
if (FreeMB < MINFREEDISK) { if (FreeMB < MINFREEDISK) {
if (!Timer || time(NULL) - LastNoDiskSpaceMessage > NODISKSPACEDELTA) { if (!Timer || time(NULL) - LastNoDiskSpaceMessage > NODISKSPACEDELTA) {