]> mj.ucw.cz Git - libucw.git/commit
Config: If cf_def_file is NULL, initialize the configuration.
authorMartin Mares <mj@ucw.cz>
Sun, 22 Feb 2009 10:41:13 +0000 (11:41 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 22 Feb 2009 10:41:13 +0000 (11:41 +0100)
commitb05c4e0038343a70f086d85f17bb1947fa789d16
treeb18846cd595943e07e190593cefb8265eaddc330
parentc51ecde8966b8b94502264af84db7c2e8b07b2ef
Config: If cf_def_file is NULL, initialize the configuration.

Otherwise we end up uninitialized clists and other nasty stuff. (The problems
were rarely visible, but the recent changes to conf-input.c have caused some
extra commits, which crashed when no configuration was loaded.)

This is a departure from the behavior of LibUCW 3.12, but I think we should
guarantee that after cf_getopt(), the configuration is always in a consistent
state, meaning that it has been initialized and committed. This should not
depend on whether the default config file was loaded or not.

On the other hand, program which avoid cf_getopt() and call cf_load() are on
their own, there is no implicit commit for them yet. Maybe this should be
fixed, too.
ucw/conf-input.c