summaryrefslogtreecommitdiff
path: root/coreengine/viewelementscommon.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreengine/viewelementscommon.c')
-rw-r--r--coreengine/viewelementscommon.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/coreengine/viewelementscommon.c b/coreengine/viewelementscommon.c
index 0f9c85c..2226b77 100644
--- a/coreengine/viewelementscommon.c
+++ b/coreengine/viewelementscommon.c
@@ -287,18 +287,27 @@ bool cVeDevices::Parse(bool forced) {
else
deviceLiveTV = primaryDevice->DeviceNumber();
}
- //check currently recording devices
- for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer)) {
- if (!timer->Recording()) {
- continue;
- }
- if (cRecordControl *RecordControl = cRecordControls::GetRecordControl(timer)) {
- const cDevice *recDevice = RecordControl->Device();
- if (recDevice) {
- mutexDevices.Lock();
- if (recDevices)
- recDevices[recDevice->DeviceNumber()] = true;
- mutexDevices.Unlock();
+ // check currently recording devices
+ // BLOCK for LOCK_TIMERS_READ scope !!
+ {
+#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+ LOCK_TIMERS_READ;
+ const cTimers* timers = Timers;
+#else
+ const cTimers* timers = &Timers;
+#endif
+ for (const cTimer *timer = timers->First(); timer; timer = timers->Next(timer)) {
+ if (!timer->Recording()) {
+ continue;
+ }
+ if (cRecordControl *RecordControl = cRecordControls::GetRecordControl(timer)) {
+ const cDevice *recDevice = RecordControl->Device();
+ if (recDevice) {
+ mutexDevices.Lock();
+ if (recDevices)
+ recDevices[recDevice->DeviceNumber()] = true;
+ mutexDevices.Unlock();
+ }
}
}
}