mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed an invalid lock sequence when trying to remove a deleted recording in case of low disk space; now making sure that AssertFreeDiskSpace() is called with the maximum timer priority in case there are several timers recording with different priorities
This commit is contained in:
parent
7bbbfb0dee
commit
19275aa8bb
6
HISTORY
6
HISTORY
@ -9162,7 +9162,7 @@ Video Disk Recorder Revision History
|
|||||||
a subdirectory.
|
a subdirectory.
|
||||||
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
|
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
|
||||||
|
|
||||||
2017-10-11: Version 2.3.9
|
2017-10-31: Version 2.3.9
|
||||||
|
|
||||||
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
||||||
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||||
@ -9170,3 +9170,7 @@ Video Disk Recorder Revision History
|
|||||||
helping to debug this one).
|
helping to debug this one).
|
||||||
- Fixed handling VPS events outside the LingerLimit, which could cause recordings to
|
- Fixed handling VPS events outside the LingerLimit, which could cause recordings to
|
||||||
stop prematurely (thanks to Johann Friedrichs).
|
stop prematurely (thanks to Johann Friedrichs).
|
||||||
|
- Fixed an invalid lock sequence when trying to remove a deleted recording in case
|
||||||
|
of low disk space.
|
||||||
|
- Now making sure that AssertFreeDiskSpace() is called with the maximum timer
|
||||||
|
priority in case there are several timers recording with different priorities.
|
||||||
|
3
menu.c
3
menu.c
@ -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 4.41 2017/06/30 09:49:39 kls Exp $
|
* $Id: menu.c 4.42 2017/10/31 09:42:07 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -5208,7 +5208,6 @@ bool cRecordControl::Process(time_t t)
|
|||||||
timer->SetPending(false);
|
timer->SetPending(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
AssertFreeDiskSpace(timer->Priority());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
timers.c
12
timers.c
@ -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: timers.c 4.11 2017/06/25 10:02:09 kls Exp $
|
* $Id: timers.c 4.12 2017/10/31 09:41:31 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
@ -804,6 +804,16 @@ const cTimer *cTimers::GetMatch(const cEvent *Event, eTimerMatch *Match) const
|
|||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int cTimers::GetMaxPriority(void) const
|
||||||
|
{
|
||||||
|
int n = 0;
|
||||||
|
for (const cTimer *ti = First(); ti; ti = Next(ti)) {
|
||||||
|
if (!ti->Remote() && ti->Recording())
|
||||||
|
n = max(n, ti->Priority());
|
||||||
|
}
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
const cTimer *cTimers::GetNextActiveTimer(void) const
|
const cTimer *cTimers::GetNextActiveTimer(void) const
|
||||||
{
|
{
|
||||||
const cTimer *t0 = NULL;
|
const cTimer *t0 = NULL;
|
||||||
|
4
timers.h
4
timers.h
@ -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: timers.h 4.8 2017/04/20 09:09:45 kls Exp $
|
* $Id: timers.h 4.9 2017/10/31 09:47:14 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TIMERS_H
|
#ifndef __TIMERS_H
|
||||||
@ -176,6 +176,8 @@ public:
|
|||||||
cTimer *GetMatch(time_t t) { return const_cast<cTimer *>(static_cast<const cTimers *>(this)->GetMatch(t)); };
|
cTimer *GetMatch(time_t t) { return const_cast<cTimer *>(static_cast<const cTimers *>(this)->GetMatch(t)); };
|
||||||
const cTimer *GetMatch(const cEvent *Event, eTimerMatch *Match = NULL) const;
|
const cTimer *GetMatch(const cEvent *Event, eTimerMatch *Match = NULL) const;
|
||||||
cTimer *GetMatch(const cEvent *Event, eTimerMatch *Match = NULL) { return const_cast<cTimer *>(static_cast<const cTimers *>(this)->GetMatch(Event, Match)); }
|
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.
|
||||||
const cTimer *GetNextActiveTimer(void) const;
|
const cTimer *GetNextActiveTimer(void) const;
|
||||||
const cTimer *UsesChannel(const cChannel *Channel) const;
|
const cTimer *UsesChannel(const cChannel *Channel) const;
|
||||||
bool SetEvents(const cSchedules *Schedules);
|
bool SetEvents(const cSchedules *Schedules);
|
||||||
|
4
vdr.c
4
vdr.c
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at http://www.tvdr.de
|
* The project's page is at http://www.tvdr.de
|
||||||
*
|
*
|
||||||
* $Id: vdr.c 4.18 2017/06/10 11:53:39 kls Exp $
|
* $Id: vdr.c 4.19 2017/10/31 09:46:22 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -1171,6 +1171,8 @@ int main(int argc, char *argv[])
|
|||||||
// Trigger remote timer polls:
|
// Trigger remote timer polls:
|
||||||
if (TriggerRemoteTimerPoll)
|
if (TriggerRemoteTimerPoll)
|
||||||
Timers->TriggerRemoteTimerPoll();
|
Timers->TriggerRemoteTimerPoll();
|
||||||
|
// Make sure there is enough free disk space for ongoing recordings:
|
||||||
|
AssertFreeDiskSpace(Timers->GetMaxPriority());
|
||||||
TimersStateKey.Remove(TimersModified);
|
TimersStateKey.Remove(TimersModified);
|
||||||
}
|
}
|
||||||
// Recordings:
|
// Recordings:
|
||||||
|
Loading…
Reference in New Issue
Block a user