summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <kamel5 (at) gmx (dot) net>2018-05-04 11:36:06 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-01-27 11:41:49 +0100
commitb086cf85dcbdbb31e6a89b44babe01d7f0714ae8 (patch)
treeb872cfe58451554f51bf08c48eabc7ec4f9840fb
parentb054fa2c12f58e2b406be903d92e81f1013e526b (diff)
downloadvdr-plugin-tvguide-b086cf85dcbdbb31e6a89b44babe01d7f0714ae8.tar.gz
vdr-plugin-tvguide-b086cf85dcbdbb31e6a89b44babe01d7f0714ae8.tar.bz2
Changes for locking in cChannelColumn::SetTimers()
-rw-r--r--channelcolumn.c2
-rw-r--r--epggrid.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/channelcolumn.c b/channelcolumn.c
index f43f33c..459411d 100644
--- a/channelcolumn.c
+++ b/channelcolumn.c
@@ -386,11 +386,13 @@ void cChannelColumn::SetTimers() {
#if VDRVERSNUM >= 20301
hasTimer = false;
const cSchedule *Schedule = NULL;
+ {
LOCK_SCHEDULES_READ;
const cSchedules* schedules = Schedules;
if (schedules) {
Schedule = schedules->GetSchedule(channel);
hasTimer = Schedule ? Schedule->HasTimer() : false;
+ }
}
#else
hasTimer = channel->HasTimer();
diff --git a/epggrid.c b/epggrid.c
index 9b6ef1a..d73cb20 100644
--- a/epggrid.c
+++ b/epggrid.c
@@ -155,9 +155,11 @@ void cEpgGrid::drawText() {
drawIcon("Switch", theme.Color(clrButtonYellow));
if (hasTimer) {
const cTimer *timer = NULL;
+ {
LOCK_TIMERS_READ;
timer = Timers->GetMatch(event);
- if (timer)
+ }
+ if (timer)
#ifdef USE_SWITCHONLY
if (timer->HasFlags(tfSwitchOnly))
drawIcon("Switch", theme.Color(clrButtonYellow));