summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Friedrichs <johann.friedrichs@web.de>2019-09-19 17:47:29 (GMT)
committerJohann Friedrichs <johann.friedrichs@web.de>2019-09-19 17:47:29 (GMT)
commitfe85b18765ad945dbf590766c4274af64fb40f2a (patch)
treeaafa37a205e0e969ac2cf3554bd948de6a13ae6f
parent770de32f1908b1f9c60f66bf288a4c8a03f97d52 (diff)
downloadvdr-plugin-epgsearch-fe85b18765ad945dbf590766c4274af64fb40f2a.tar.gz
vdr-plugin-epgsearch-fe85b18765ad945dbf590766c4274af64fb40f2a.tar.bz2
Keep Schedules locked while evaluating events
-rw-r--r--menu_main.c6
-rw-r--r--menu_whatson.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/menu_main.c b/menu_main.c
index 1917a82..30f7724 100644
--- a/menu_main.c
+++ b/menu_main.c
@@ -117,11 +117,9 @@ void cMenuSearchMain::PrepareSchedule(const cChannel *Channel)
eventObjects.Clear();
LOCK_TIMERS_READ;
+ LOCK_SCHEDULES_READ;
const cSchedule *Schedule;
- {
- LOCK_SCHEDULES_READ;
- Schedule = Schedules->GetSchedule(Channel);
- }
+ Schedule = Schedules->GetSchedule(Channel);
currentChannel = Channel->Number();
if (Schedule && Schedule->Events()->First()) {
const cEvent *PresentEvent = Schedule->GetPresentEvent();
diff --git a/menu_whatson.c b/menu_whatson.c
index 9384205..3d46642 100644
--- a/menu_whatson.c
+++ b/menu_whatson.c
@@ -407,11 +407,9 @@ void cMenuWhatsOnSearch::LoadSchedules()
if (EPGSearchConfig.showRadioChannels == 0 && ISRADIO(Channel))
continue;
+ LOCK_SCHEDULES_READ;
const cSchedule *Schedule;
- {
- LOCK_SCHEDULES_READ;
- Schedule = Schedules->GetSchedule(Channel);
- }
+ Schedule = Schedules->GetSchedule(Channel);
const cEvent *Event = NULL;
if (Schedule) {
if (shiftTime != 0)