mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added a mutex to AssertFreeDiskSpace() to make sure calls from foreground and background threads won't interfere
This commit is contained in:
parent
7a0af2292c
commit
587ea30ab4
2
HISTORY
2
HISTORY
@ -3987,3 +3987,5 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed a possible crash when displaying the "Low disk space!" message from
|
- Fixed a possible crash when displaying the "Low disk space!" message from
|
||||||
a background thread (thanks to Christof Steininger).
|
a background thread (thanks to Christof Steininger).
|
||||||
- Fixed handling OSD areas that have invalid sizes (thanks to Marco Schlüßler).
|
- Fixed handling OSD areas that have invalid sizes (thanks to Marco Schlüßler).
|
||||||
|
- Added a mutex to AssertFreeDiskSpace() to make sure calls from foreground
|
||||||
|
and background threads won't interfere.
|
||||||
|
@ -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: recording.c 1.127 2005/12/18 12:37:10 kls Exp $
|
* $Id: recording.c 1.128 2005/12/18 13:09:47 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "recording.h"
|
#include "recording.h"
|
||||||
@ -84,6 +84,8 @@ void RemoveDeletedRecordings(void)
|
|||||||
|
|
||||||
void AssertFreeDiskSpace(int Priority)
|
void AssertFreeDiskSpace(int Priority)
|
||||||
{
|
{
|
||||||
|
static cMutex Mutex;
|
||||||
|
cMutexLock MutexLock(&Mutex);
|
||||||
// With every call to this function we try to actually remove
|
// With every call to this function we try to actually remove
|
||||||
// a file, or mark a file for removal ("delete" it), so that
|
// a file, or mark a file for removal ("delete" it), so that
|
||||||
// it will get removed during the next call.
|
// it will get removed during the next call.
|
||||||
|
Loading…
Reference in New Issue
Block a user