From 4c4b909be6dd8643372ec683ec73f73725cb3a77 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Fri, 28 Feb 2014 03:36:06 +0200 Subject: [PATCH] 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 (8dd1c2d4aff5e40e4a87f59fa09f8de3f2232fc1) 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. --- example.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/example.conf b/example.conf index 1944ca58..5c2af887 100644 --- a/example.conf +++ b/example.conf @@ -60,10 +60,6 @@ "temp-cutoff" : "95,95,95,95", "temp-hysteresis" : "3", -"api-listen" : false, -"api-mcast-port" : "4028", -"api-port" : "4028", - "queue" : "1", "scan-time" : "7", "expiry" : "28",