Browse Source

doc: in example.conf, remove boolean values (and ones related to them) set to non-default states.

The config parser has a bug, and can only set boolean options to
non-default state. If a default state is given to an OPT_WITHOUT_ARG
option (as defined in the config table), it is set to the non-default state
anyway, because a CCAN function opt_set_[inv]bool() is used, which is not
meant for this.

Therefore, using such options from the command line is fine, but specifying
them in the .conf file results in above-described behaviour.

E.g., a user tests

    "api-listen" : true

in the config, but changes it later to

    "api-listen" : false

The option will be set true anyway.

A previous commit (8dd1c2d4af) has allowed
this, whereas previously only setting to true was allowed.

Currently boolead options that default to true and can be set false by
the user are explicitly defined as true, e.g.:

    bool opt_restart = true;

There is no simple or right way around this. This is an issue with the
design.
build-mingw
Noel Maersk 11 years ago
parent
commit
4c4b909be6
  1. 4
      example.conf

4
example.conf

@ -60,10 +60,6 @@
"temp-cutoff" : "95,95,95,95", "temp-cutoff" : "95,95,95,95",
"temp-hysteresis" : "3", "temp-hysteresis" : "3",
"api-listen" : false,
"api-mcast-port" : "4028",
"api-port" : "4028",
"queue" : "1", "queue" : "1",
"scan-time" : "7", "scan-time" : "7",
"expiry" : "28", "expiry" : "28",

Loading…
Cancel
Save