Crash on first start without setup.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

 (I'm still on 1.7.19 so forgive me if this already has been solved...)

 I just got a report that starting vdr without setup.conf crashes in
isnumber(Setup.InitialChannel) called from main() so I came up with
this bandaid fix:

--- vdr.c.orig
+++ vdr.c
@@ -735,6 +735,8 @@ int main(int argc, char *argv[])
 
   if (!cDevice::WaitForAllDevicesReady(DEVICEREADYTIMEOUT))
      dsyslog("not all devices ready after %d seconds", DEVICEREADYTIMEOUT);
+  if (((const char *)Setup.InitialChannel) == NULL)
+     Setup.InitialChannel = "0";
   if (isnumber(Setup.InitialChannel)) { // for compatibility with old setup.conf files
      if (cChannel *Channel = Channels.GetByNumber(atoi(Setup.InitialChannel)))
         Setup.InitialChannel = Channel->GetChannelID().ToString();

 Is that ok or should cSetup::cSetup(void) in config.c be changed,
it doesn't initialize InitialChannel, there only is a comment:

  // InitialChannel is initialized by constructor

 Thanx,
	Juergen

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux