[vdr] Failed to read channels.conf after adding transponder

Klaus Schmidinger Klaus.Schmidinger at cadsoft.de
Sat Sep 6 16:22:54 CEST 2008


On 06/18/08 15:12, Tim wrote:
> Am Mittwoch 18 Juni 2008 schrieb Frank Scherthan:
>> Hi
>>
>> Hanno Zulla schrieb:
>>>> Is there an easy fix I could test right now? Can I disable the
>>>> channel-checking?
>>> Yes, you can. Check the DVB settings menu.
>> You are wrong. I am not talking about *updating channels*.
>> I know about that and as a workaround, I switched it off.
>> BUT:
>> This is NOT what I am looking for.
>>
>> I want to disable the check, for invalid channels in channels.conf
>> I just don't care, if a channel is not "tuneable".
> in config.h, in the function "bool Load()" at about line 123 (vdr 1.4.7) 
> uncomment 2 lines:
>                    else {
>                       esyslog("ERROR: error in %s, line %d", fileName, line);
>                       delete l;
>                       //RC: we do not want to exit vdr just because of a 
> simple error
>                       //result = false;
>                       //break;
>                       }
>                    }
>                 }
> this will cause vdr to go on starting even if an error accours in a config 
> file and increase waf. ;)

Since this kind of complaints keeps occuring ever again, I guess it's best
to simply report errors when reading config files (as suggested by Tim)

--- config.h    2008/04/19 09:19:22     2.2
+++ config.h    2008/09/06 14:06:56
@@ -122,7 +122,6 @@
                        esyslog("ERROR: error in %s, line %d", fileName, line);
                        delete l;
                        result = false;
-                      break;
                        }
                     }
                  }

and ignore the result values in vdr.c:

--- vdr.c       2008/09/06 11:24:21     2.2
+++ vdr.c       2008/09/06 14:08:44
@@ -559,17 +559,15 @@
    cThemes::SetThemesDirectory(AddDirectory(ConfigDirectory, "themes"));

    Setup.Load(AddDirectory(ConfigDirectory, "setup.conf"));
-  if (!(Sources.Load(AddDirectory(ConfigDirectory, "sources.conf"), true, true) &&
-        Diseqcs.Load(AddDirectory(ConfigDirectory, "diseqc.conf"), true, Setup.DiSEqC) &&
-        Channels.Load(AddDirectory(ConfigDirectory, "channels.conf"), false, true) &&
-        Timers.Load(AddDirectory(ConfigDirectory, "timers.conf")) &&
-        Commands.Load(AddDirectory(ConfigDirectory, "commands.conf"), true) &&
-        RecordingCommands.Load(AddDirectory(ConfigDirectory, "reccmds.conf"), true) &&
-        SVDRPhosts.Load(AddDirectory(ConfigDirectory, "svdrphosts.conf"), true) &&
-        Keys.Load(AddDirectory(ConfigDirectory, "remote.conf")) &&
-        KeyMacros.Load(AddDirectory(ConfigDirectory, "keymacros.conf"), true)
-        ))
-     EXIT(2);
+  Sources.Load(AddDirectory(ConfigDirectory, "sources.conf"), true, true);
+  Diseqcs.Load(AddDirectory(ConfigDirectory, "diseqc.conf"), true, Setup.DiSEqC);
+  Channels.Load(AddDirectory(ConfigDirectory, "channels.conf"), false, true);
+  Timers.Load(AddDirectory(ConfigDirectory, "timers.conf"));
+  Commands.Load(AddDirectory(ConfigDirectory, "commands.conf"), true);
+  RecordingCommands.Load(AddDirectory(ConfigDirectory, "reccmds.conf"), true);
+  SVDRPhosts.Load(AddDirectory(ConfigDirectory, "svdrphosts.conf"), true);
+  Keys.Load(AddDirectory(ConfigDirectory, "remote.conf"));
+  KeyMacros.Load(AddDirectory(ConfigDirectory, "keymacros.conf"), true);

    if (!*cFont::GetFontFileName(Setup.FontOsd)) {
       const char *msg = "no fonts available - OSD will not show any text!";


Of course Tim's change would have had the same result, but it also would
have made it completely impossible for the caller of cConfig::Load() to
determine if the call was successful.

Well, whether this actually increases the WAF remains to be seen. Starting
VDR with inconsistent config files may have all kinds of effects...

Klaus



More information about the vdr mailing list