Commit 19fc0486 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make up my mind: defaults go in varnishd



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3099 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 5065b2b2
......@@ -351,8 +351,8 @@ vcc_ParseProbe(struct tokenlist *tl)
ExpectErr(tl, '{');
vcc_NextToken(tl);
window = 8;
threshold = 3;
window = 0;
threshold = 0;
Fb(tl, 0, "\t.probe = {\n");
while (tl->t->tok != '}') {
......@@ -414,32 +414,36 @@ vcc_ParseProbe(struct tokenlist *tl)
vcc_NextToken(tl);
}
if (t_threshold == NULL && t_window != NULL) {
vsb_printf(tl->sb, "Must specify .threshold with .window\n");
vcc_ErrWhere(tl, t_window);
return;
} else if (t_threshold != NULL && t_window == NULL) {
if (threshold > 64) {
vsb_printf(tl->sb, "Threshold must be 64 or less.\n");
vcc_ErrWhere(tl, t_threshold);
if (t_threshold != NULL || t_window != NULL) {
if (t_threshold == NULL && t_window != NULL) {
vsb_printf(tl->sb,
"Must specify .threshold with .window\n");
vcc_ErrWhere(tl, t_window);
return;
} else if (t_threshold != NULL && t_window == NULL) {
if (threshold > 64) {
vsb_printf(tl->sb,
"Threshold must be 64 or less.\n");
vcc_ErrWhere(tl, t_threshold);
return;
}
window = threshold + 1;
} else if (window > 64) {
AN(t_window);
vsb_printf(tl->sb, "Window must be 64 or less.\n");
vcc_ErrWhere(tl, t_window);
return;
}
window = threshold + 1;
} else if (window > 64) {
AN(t_window);
vsb_printf(tl->sb, "Window must be 64 or less.\n");
vcc_ErrWhere(tl, t_window);
return;
}
if (threshold > window ) {
vsb_printf(tl->sb,
"Threshold can not be greater than window.\n");
vcc_ErrWhere(tl, t_threshold);
AN(t_window);
vcc_ErrWhere(tl, t_window);
if (threshold > window ) {
vsb_printf(tl->sb,
"Threshold can not be greater than window.\n");
vcc_ErrWhere(tl, t_threshold);
AN(t_window);
vcc_ErrWhere(tl, t_window);
}
Fb(tl, 0, "\t\t.window = %u,\n", window);
Fb(tl, 0, "\t\t.threshold = %u\n", threshold);
}
Fb(tl, 0, "\t\t.window = %u,\n", window);
Fb(tl, 0, "\t\t.threshold = %u\n", threshold);
Fb(tl, 0, "\t},\n");
ExpectErr(tl, '}');
vcc_NextToken(tl);
......
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