Commit 28407400 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Stop segfaulting when trying to set a nonexistant waiter

We failed to properly check for the end of the list of waiters.
Handle this correctly and add a test case

Fixes #428


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3825 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d8841b80
......@@ -368,7 +368,7 @@ VCA_tweak_waiter(struct cli *cli, const char *arg)
vca_act = NULL;
return;
}
for (i = 0; vca_waiters[i]->name; i++) {
for (i = 0; vca_waiters[i]; i++) {
if (!strcmp(arg, vca_waiters[i]->name)) {
vca_act = vca_waiters[i];
return;
......
......@@ -19,3 +19,7 @@ varnish v1 -start
varnish v1 -cliok "help"
varnish v1 -cliok "stats"
varnish v1 -cliok "param.set waiter default"
varnish v1 -clierr 106 "param.set waiter HASH(0x8839c4c)"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment