summaryrefslogtreecommitdiff
path: root/coreengine/viewelementscommon.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2016-03-13 16:02:26 +0100
committerlouis <louis.braun@gmx.de>2016-03-13 16:02:26 +0100
commitb40f8c014eb56426188db2e6efca48312458617d (patch)
tree09a6f8f39afdbf922191b58e7baefdc30e06ae43 /coreengine/viewelementscommon.c
parentef69fa6b36113f6b3a256b44d4865be3ccc867de (diff)
downloadvdr-plugin-skindesigner-b40f8c014eb56426188db2e6efca48312458617d.tar.gz
vdr-plugin-skindesigner-b40f8c014eb56426188db2e6efca48312458617d.tar.bz2
added VDR 2.3.1 compatibility
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();
+ }
}
}
}