From: phk Date: Thu, 16 Oct 2008 10:32:47 +0000 (+0000) Subject: Allow "true" and "false" as settings for booleans X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d69737a59e579e0a6df8929a918f8406aaf7b5a;p=varnish Allow "true" and "false" as settings for booleans git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3312 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/mgt_param.c b/varnish-cache/bin/varnishd/mgt_param.c index fab995dd..ddf9691d 100644 --- a/varnish-cache/bin/varnishd/mgt_param.c +++ b/varnish-cache/bin/varnishd/mgt_param.c @@ -122,12 +122,16 @@ tweak_generic_bool(struct cli *cli, volatile unsigned *dest, const char *arg) *dest = 0; else if (!strcasecmp(arg, "no")) *dest = 0; + else if (!strcasecmp(arg, "false")) + *dest = 0; else if (!strcasecmp(arg, "on")) *dest = 1; else if (!strcasecmp(arg, "enable")) *dest = 1; else if (!strcasecmp(arg, "yes")) *dest = 1; + else if (!strcasecmp(arg, "true")) + *dest = 1; else { cli_out(cli, "use \"on\" or \"off\"\n"); cli_result(cli, CLIS_PARAM);