From e96911dfac925247c4f70e50fa96c4741ab01e67 Mon Sep 17 00:00:00 2001 From: kamel5 Date: Fri, 5 Jul 2019 16:24:04 +0200 Subject: Fixed invalid lock sequence reports --- channelepg.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'channelepg.c') diff --git a/channelepg.c b/channelepg.c index 3ca9173..b5af13c 100644 --- a/channelepg.c +++ b/channelepg.c @@ -22,12 +22,15 @@ bool cChannelEpg::ReadGrids(void) { const cSchedule *Schedule = NULL; + const cSchedules* schedules; #if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + { LOCK_SCHEDULES_READ; - const cSchedules* schedules = Schedules; + schedules = Schedules; + } #else cSchedulesLock schedulesLock; - const cSchedules* schedules = (cSchedules*)cSchedules::Schedules(schedulesLock); + schedules = (cSchedules*)cSchedules::Schedules(schedulesLock); #endif if (!schedules) return false; @@ -171,12 +174,15 @@ void cChannelEpg::AddNewGridsAtStart(void) { return; } //if not, i have to add new ones to the list + const cSchedules* schedules; #if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + { LOCK_SCHEDULES_READ; - const cSchedules* schedules = Schedules; + schedules = Schedules; + } #else cSchedulesLock schedulesLock; - const cSchedules* schedules = (cSchedules*)cSchedules::Schedules(schedulesLock); + schedules = (cSchedules*)cSchedules::Schedules(schedulesLock); #endif if (!schedules) return ; @@ -225,12 +231,15 @@ void cChannelEpg::AddNewGridsAtEnd(void) { return; } //if not, i have to add new ones to the list + const cSchedules* schedules; #if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + { LOCK_SCHEDULES_READ; - const cSchedules* schedules = Schedules; + schedules = Schedules; + } #else cSchedulesLock schedulesLock; - const cSchedules* schedules = (cSchedules*)cSchedules::Schedules(schedulesLock); + schedules = (cSchedules*)cSchedules::Schedules(schedulesLock); #endif if (!schedules) return ; -- cgit v1.2.3