From 4436b5eb2f8bb6b0eeb10a5d233b13a5f9bc363f Mon Sep 17 00:00:00 2001 From: Lucian Muresan Date: Sun, 29 Jan 2017 02:24:28 +0100 Subject: adapted to vdr >= 2.3.1 --- state.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/state.c b/state.c index 23be6d1..b2dead2 100644 --- a/state.c +++ b/state.c @@ -675,8 +675,12 @@ void cGraphLCDState::UpdateChannelInfo(void) } mutex.Lock(); - +#if APIVERSNUM < 20301 cChannel * ch = Channels.GetByNumber(mChannel.number); +#else + LOCK_CHANNELS_READ; + const cChannel * ch = Channels->GetByNumber(mChannel.number); +#endif if (ch) { mChannel.id = ch->GetChannelID(); @@ -713,8 +717,11 @@ void cGraphLCDState::UpdateEventInfo(void) { mutex.Lock(); const cEvent * present = NULL, * following = NULL; +#if APIVERSNUM < 20301 cSchedulesLock schedulesLock; - +#else + LOCK_SCHEDULES_READ; +#endif // backup current values std::string currTitle = mPresent.title; std::string currShortText = mPresent.shortText; @@ -737,8 +744,11 @@ void cGraphLCDState::UpdateEventInfo(void) mFollowing.title = ""; mFollowing.shortText = ""; mFollowing.description = ""; - +#if APIVERSNUM < 20301 const cSchedules * schedules = cSchedules::Schedules(schedulesLock); +#else + const cSchedules * schedules = Schedules; +#endif if (mChannel.id.Valid()) { if (schedules) -- cgit v1.2.3