summarylogtreecommitdiffstats
path: root/vdr-lcdproc-vdr-2.3.2.patch
blob: 55a6bc3b5df2447f649f6e9dee710dd7e04d0dbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Author: fnu
https://www.vdr-portal.de/forum/index.php?thread/130045-produktive-problem-und-pluginl%C3%B6sungen-f%C3%BCr-vdr-2-3-2-und-h%C3%B6her/&postID=1284634#post1284634

Index: b/lcd.c
===================================================================
--- a/lcd.c
+++ b/lcd.c
@@ -850,12 +850,22 @@
 		  }
 
 		  if ( time(NULL) > nextLcdUpdate ) {
+#if APIVERSNUM < 20301
 			  cChannel *channel = Channels.GetByNumber(primaryDvbApi->CurrentChannel());
+#else
+			  LOCK_CHANNELS_READ;
+			  const cChannel *channel = Channels->GetByNumber(primaryDvbApi->CurrentChannel());
+#endif
 			  const cEvent *Present = NULL;
+#if APIVERSNUM < 20301
 			  cSchedulesLock schedulesLock;
 			  const cSchedules *Schedules = cSchedules::Schedules(schedulesLock);
 			  if (Schedules) {
 				  const cSchedule *Schedule = Schedules->GetSchedule(channel->GetChannelID());
+#else
+			  LOCK_SCHEDULES_READ;
+		          const cSchedule *Schedule = Schedules->GetSchedule(channel->GetChannelID());
+#endif
 				  if (Schedule) {
 					  const char *PresentTitle, *PresentSubtitle;
 					  PresentTitle = NULL; PresentSubtitle = NULL;
@@ -873,7 +883,10 @@
 						  rtcycle = 10; // RT
 						  lcrCycle = 10; // LCR
 				  }
+#if APIVERSNUM < 20301
 			  }
+#endif
+
 			  if ( nextLcdUpdate <= time(NULL) )
 				  nextLcdUpdate=(time(NULL)/60)*60+60;
 		  }