summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-05-29 08:18:17 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-05-29 08:18:17 +0200
commita4c851f759cf51760223e63b3f06d29743d80031 (patch)
treeaeeaa7480754ae513adba10573022f440ce84d90
parent2751e239eba118a319c1c8518fb199dc5d4114e4 (diff)
downloadvdr-a4c851f759cf51760223e63b3f06d29743d80031.tar.gz
vdr-a4c851f759cf51760223e63b3f06d29743d80031.tar.bz2
Fixed the locking sequence when starting a recording
-rw-r--r--HISTORY1
-rw-r--r--menu.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index bcc6ddcf..456fe28a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9064,3 +9064,4 @@ Video Disk Recorder Revision History
sequence, the 20 most recent locks will be printed to stderr, followed by a
backtrace that led to the call in question.
- Fixed the locking sequence when dumping EPG data.
+- Fixed the locking sequence when starting a recording.
diff --git a/menu.c b/menu.c
index 246c4df3..5160a726 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 4.29 2017/05/21 13:18:26 kls Exp $
+ * $Id: menu.c 4.30 2017/05/28 21:14:20 kls Exp $
*/
#include "menu.h"
@@ -5056,7 +5056,8 @@ cRecordControl::cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer,
Timers->SetModified();
// We're going to work with an event here, so we need to prevent
// others from modifying any EPG data:
- LOCK_SCHEDULES_READ;
+ cStateKey SchedulesStateKey;
+ cSchedules::GetSchedulesRead(SchedulesStateKey);
event = NULL;
fileName = NULL;
@@ -5092,6 +5093,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer,
cReplayControl::SetRecording(fileName);
}
timer = NULL;
+ SchedulesStateKey.Remove();
return;
}
@@ -5105,6 +5107,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer,
cStatus::MsgRecording(device, Recording.Name(), Recording.FileName(), true);
if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo()
cReplayControl::SetRecording(fileName);
+ SchedulesStateKey.Remove();
LOCK_RECORDINGS_WRITE;
Recordings->AddByName(fileName);
return;
@@ -5118,6 +5121,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimers *Timers, cTimer *Timer,
Timers->Del(timer);
timer = NULL;
}
+ SchedulesStateKey.Remove();
}
cRecordControl::~cRecordControl()