summaryrefslogtreecommitdiff
blob: f71df8e2edd803606b36c086dc9f57ba84e48737 (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
--- vdr-1.6.0_extensions.diff.orig	2008-04-15 21:09:29.462210539 +0200
+++ vdr-1.6.0_extensions.diff	2008-04-15 21:10:04.742218023 +0200
@@ -2900,37 +2900,6 @@
        }
    if (Empty && Tid == 0x4E && getSectionNumber() == 0)
       // ETR 211: an empty entry in section 0 of table 0x4E means there is currently no event running
-@@ -296,12 +457,30 @@ cTDT::cTDT(const u_char *Data)
-   time_t sattim = getTime();
-   time_t loctim = time(NULL);
- 
-+#ifdef USE_SETTIME
-+  char *cmd;
-+  char timestr[20];
-+  struct tm *ptm;
-+  struct tm tm_r;
-+  ptm = localtime_r(&sattim, &tm_r);
-+#endif /* SETTIME */
-+
-   int diff = abs(sattim - loctim);
-   if (diff > 2) {
-      mutex.Lock();
-      if (abs(diff - lastDiff) < 3) {
-         isyslog("System Time = %s (%ld)", *TimeToString(loctim), loctim);
-         isyslog("Local Time  = %s (%ld)", *TimeToString(sattim), sattim);
-+#ifdef USE_SETTIME
-+        if (SetTime) {
-+           strftime(timestr,20,"%m%d%H%M%Y.%S",ptm);
-+           asprintf(&cmd,"%s %s %ld",SetTime,timestr,sattim);
-+           dsyslog("Executing: %s",cmd);
-+           SystemExec(cmd);
-+           free(cmd);
-+           }
-+        else
-+#endif /* SETTIME */
-         if (stime(&sattim) < 0)
-            esyslog("ERROR while setting system time: %m");
-         }
 diff -ruNp vdr-1.6.0/eitscan.c vdr-1.6.0-extensions/eitscan.c
 --- vdr-1.6.0/eitscan.c	2006-01-07 15:10:17.000000000 +0100
 +++ vdr-1.6.0-extensions/eitscan.c	2008-04-10 01:42:18.000000000 +0200