]> err.no Git - varnish/commitdiff
Allow "true" and "false" as settings for booleans
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 16 Oct 2008 10:32:47 +0000 (10:32 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 16 Oct 2008 10:32:47 +0000 (10:32 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3312 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/mgt_param.c

index fab995ddb3962419745d69ecc24e49c4d2d730ae..ddf9691d632622e526f8b02bf4380804a600a9e4 100644 (file)
@@ -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);