diff options
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | timers.c | 4 | ||||
-rw-r--r-- | timers.h | 3 | ||||
-rw-r--r-- | vdr.c | 6 |
4 files changed, 10 insertions, 6 deletions
@@ -9348,7 +9348,7 @@ Video Disk Recorder Revision History Senzel). - Official release. -2019-05-20: Version 2.4.1 +2019-05-23: Version 2.4.1 - Fixed handling the tfRecording flag in the SVDRP commands MODT and UPDT (reported by Johann Friedrichs). @@ -9407,3 +9407,4 @@ Video Disk Recorder Revision History - Fixed handling repeat function for keyboards. - Added a workaround for broadcasters who set an event to status "not running" where this is inappropriate; implicitly setting events to "not running" is now also logged. +- Fixed asserting free disk space in case there is no local timer currently recording. @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.c 4.18 2018/03/17 10:07:19 kls Exp $ + * $Id: timers.c 4.19 2019/05/23 09:46:32 kls Exp $ */ #include "timers.h" @@ -819,7 +819,7 @@ const cTimer *cTimers::GetMatch(const cEvent *Event, eTimerMatch *Match) const int cTimers::GetMaxPriority(void) const { - int n = 0; + int n = -1; for (const cTimer *ti = First(); ti; ti = Next(ti)) { if (!ti->Remote() && ti->Recording()) n = max(n, ti->Priority()); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.h 4.11 2018/02/27 13:57:26 kls Exp $ + * $Id: timers.h 4.12 2019/05/23 09:47:19 kls Exp $ */ #ifndef __TIMERS_H @@ -178,6 +178,7 @@ public: cTimer *GetMatch(const cEvent *Event, eTimerMatch *Match = NULL) { return const_cast<cTimer *>(static_cast<const cTimers *>(this)->GetMatch(Event, Match)); } int GetMaxPriority(void) const; ///< Returns the maximum priority of all local timers that are currently recording. + ///< If there is no local timer currently recording, -1 is returned. const cTimer *GetNextActiveTimer(void) const; const cTimer *UsesChannel(const cChannel *Channel) const; bool SetEvents(const cSchedules *Schedules); @@ -22,7 +22,7 @@ * * The project's page is at http://www.tvdr.de * - * $Id: vdr.c 4.29 2019/03/18 11:17:07 kls Exp $ + * $Id: vdr.c 4.30 2019/05/23 09:48:35 kls Exp $ */ #include <getopt.h> @@ -1182,7 +1182,9 @@ int main(int argc, char *argv[]) if (Timers->DeleteExpired()) TimersModified = true; // Make sure there is enough free disk space for ongoing recordings: - AssertFreeDiskSpace(Timers->GetMaxPriority()); + int MaxPriority = Timers->GetMaxPriority(); + if (MaxPriority >= 0) + AssertFreeDiskSpace(MaxPriority); TimersStateKey.Remove(TimersModified); } // Recordings: |