summaryrefslogtreecommitdiff
path: root/pages/whats_on.ecpp
diff options
context:
space:
mode:
authorRolf Ahrenberg <Rolf.Ahrenberg@sci.fi>2017-04-01 23:17:15 +0300
committerRolf Ahrenberg <Rolf.Ahrenberg@sci.fi>2017-04-01 23:17:15 +0300
commiteaa015874e3e494006d67260feaebe6377568ebb (patch)
tree9d407c10cbf0d541377a08e390ed603909abfddb /pages/whats_on.ecpp
parenta8eb15416c38009efb9562c5d64ef87719ae017c (diff)
downloadvdr-plugin-live-eaa015874e3e494006d67260feaebe6377568ebb.tar.gz
vdr-plugin-live-eaa015874e3e494006d67260feaebe6377568ebb.tar.bz2
VDR-2.3.1 compatibility patch by Nachteule.
http://www.vdr-portal.de/board16-video-disk-recorder/board55-vdr-plugins/p1280013-vdr-live-vdr-2-3-1/#post1280013
Diffstat (limited to 'pages/whats_on.ecpp')
-rw-r--r--pages/whats_on.ecpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp
index 8232875..f9a66c3 100644
--- a/pages/whats_on.ecpp
+++ b/pages/whats_on.ecpp
@@ -38,8 +38,12 @@ string current_displaytime;
if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+#if VDRVERSNUM >= 20301
+LOCK_SCHEDULES_READ;
+#else
cSchedulesLock schedulesLock;
const cSchedules* Schedules = cSchedules::Schedules(schedulesLock);
+#endif
string head;
time_t seektime = 0;
@@ -124,10 +128,19 @@ if (type == "now") {
// collect the broadcasts
if (type != "favs")
{
+#if VDRVERSNUM >= 20301
+ LOCK_CHANNELS_READ;
+ if (true) {
+#else
ReadLock channelsLock( Channels );
if (channelsLock) {
+#endif
// int evntNr = 0;
+#if VDRVERSNUM >= 20301
+ for (cChannel *Channel = (cChannel *)Channels->First(); Channel && Channel->Number() <= LiveSetup().GetLastChannel(); Channel = (cChannel *)Channels->Next(Channel)) {
+#else
for (cChannel *Channel = Channels.First(); Channel && Channel->Number() <= LiveSetup().GetLastChannel(); Channel = Channels.Next(Channel)) {
+#endif
if (Channel->GroupSep()) {
continue;
}