summaryrefslogtreecommitdiff
path: root/state.c
diff options
context:
space:
mode:
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)