[master] dc5b18b Improve "waiter" parameter description as discussed in param-audit.
Poul-Henning Kamp
phk at varnish-cache.org
Wed Jun 13 14:00:49 CEST 2012
commit dc5b18b8e095592c107b16ff911d8e05a6872efb
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Jun 13 12:00:33 2012 +0000
Improve "waiter" parameter description as discussed in param-audit.
diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index c7834a7..8e3e56d 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -1052,8 +1052,8 @@ static const struct parspec input_parspec[] = {
"off", "bool" },
{ "waiter", tweak_waiter, NULL, 0, 0,
"Select the waiter kernel interface.\n",
- EXPERIMENTAL | MUST_RESTART,
- "default", NULL },
+ WIZARD | MUST_RESTART,
+ WAITER_DEFAULT, NULL },
{ "diag_bitmap", tweak_diag_bitmap, 0, 0, 0,
"Bitmap controlling diagnostics code:\n"
" 0x00000001 - CNT_Session states.\n"
diff --git a/bin/varnishd/waiter/mgt_waiter.c b/bin/varnishd/waiter/mgt_waiter.c
index d2816a8..94d90ea 100644
--- a/bin/varnishd/waiter/mgt_waiter.c
+++ b/bin/varnishd/waiter/mgt_waiter.c
@@ -68,14 +68,14 @@ WAIT_tweak_waiter(struct cli *cli, const char *arg)
else
VCLI_Out(cli, "%s", waiter->name);
- VCLI_Out(cli, " (");
+ VCLI_Out(cli, " (possible values: ");
for (i = 0; vca_waiters[i] != NULL; i++)
VCLI_Out(cli, "%s%s", i == 0 ? "" : ", ",
vca_waiters[i]->name);
VCLI_Out(cli, ")");
return;
}
- if (!strcmp(arg, "default")) {
+ if (!strcmp(arg, WAITER_DEFAULT)) {
waiter = vca_waiters[0];
return;
}
diff --git a/bin/varnishd/waiter/waiter.h b/bin/varnishd/waiter/waiter.h
index 9f48884..9f9f795 100644
--- a/bin/varnishd/waiter/waiter.h
+++ b/bin/varnishd/waiter/waiter.h
@@ -33,6 +33,8 @@ struct sess;
typedef void* waiter_init_f(void);
typedef void waiter_pass_f(void *priv, const struct sess *);
+#define WAITER_DEFAULT "platform dependent"
+
struct waiter {
const char *name;
waiter_init_f *init;
diff --git a/bin/varnishtest/tests/b00008.vtc b/bin/varnishtest/tests/b00008.vtc
index cee8d4c..5d447b2 100644
--- a/bin/varnishtest/tests/b00008.vtc
+++ b/bin/varnishtest/tests/b00008.vtc
@@ -30,7 +30,7 @@ varnish v1 -start
varnish v1 -cliok "help"
-varnish v1 -cliok "param.set waiter default"
+varnish v1 -cliok "param.set waiter poll"
varnish v1 -clierr 106 "param.set waiter HASH(0x8839c4c)"
More information about the varnish-commit
mailing list