summaryrefslogtreecommitdiff
path: root/state.c
diff options
context:
space:
mode:
authorLucian Muresan <lucianm@users.sourceforge.net>2017-01-29 02:24:28 +0100
committerLucian Muresan <lucianm@users.sourceforge.net>2017-01-29 02:24:28 +0100
commit4436b5eb2f8bb6b0eeb10a5d233b13a5f9bc363f (patch)
tree214b4fafd8317dbdae23698bf4c335cd28b89d71 /state.c
parent07a3c498ab114fdbd35848ba0385ce369d572173 (diff)
downloadvdr-plugin-graphlcd-4436b5eb2f8bb6b0eeb10a5d233b13a5f9bc363f.tar.gz
vdr-plugin-graphlcd-4436b5eb2f8bb6b0eeb10a5d233b13a5f9bc363f.tar.bz2
adapted to vdr >= 2.3.1
Diffstat (limited to 'state.c')
-rw-r--r--state.c16
1 files 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)