summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/vdr.c b/vdr.c
index 2082054..fc1f9e0 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.181 2004/05/16 10:12:43 kls Exp $
+ * $Id: vdr.c 1.184 2004/06/13 13:52:09 kls Exp $
*/
#include <getopt.h>
@@ -84,6 +84,25 @@ static void Watchdog(int signum)
int main(int argc, char *argv[])
{
+#ifdef _CS_GNU_LIBPTHREAD_VERSION
+ // Check for NPTL and exit if present - VDR apparently doesn't run well with NPTL:
+ char LibPthreadVersion[128];
+ if (confstr(_CS_GNU_LIBPTHREAD_VERSION, LibPthreadVersion, sizeof(LibPthreadVersion) > 0)) {
+ if (strstr(LibPthreadVersion, "NPTL")) {
+ fprintf(stderr, "vdr: please turn off NPTL by setting 'export LD_ASSUME_KERNEL=2.4.1' before starting VDR\n");
+ return 2;
+ }
+ }
+#endif
+
+ // Check for UTF-8 and exit if present - asprintf() will fail if it encounters 8 bit ASCII codes
+ char *LangEnv;
+ if ((LangEnv = getenv("LANG")) != NULL && strcasestr(LangEnv, "utf") ||
+ (LangEnv = getenv("LC_TYPE")) != NULL && strcasestr(LangEnv, "utf")) {
+ fprintf(stderr, "vdr: please turn off UTF-8 before starting VDR\n");
+ return 2;
+ }
+
// Save terminal settings:
struct termios savedTm;
@@ -456,6 +475,10 @@ int main(int argc, char *argv[])
else
cDevice::PrimaryDevice()->SetVolume(Setup.CurrentVolume, true);
+ // Recordings:
+
+ Recordings.Load();
+
// Signal handlers:
if (signal(SIGHUP, SignalHandler) == SIG_IGN) signal(SIGHUP, SIG_IGN);
@@ -587,6 +610,8 @@ int main(int argc, char *argv[])
TimerInVpsMargin = true;
}
}
+ if (!Menu && Recordings.NeedsUpdate())
+ Recordings.Load();
// CAM control:
if (!Menu && !cOsd::IsOpen())
Menu = CamControl();