Commit ed93bc55 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

vut: Don't read VSL from stdin in daemon mode

parent 9853a629
......@@ -93,7 +93,9 @@
#define VUT_OPT_r \
VOPT("r:", "[-r <filename>]", "Binary file input", \
"Read log in binary file format from this file. The file" \
" can be created with ``varnishlog -w filename``." \
" can be created with ``varnishlog -w filename``. If the" \
" filename is -, logs are read from the standard input." \
" and cannot work as a daemon." \
)
#define VUT_OPT_t \
......
......@@ -302,6 +302,9 @@ VUT_Setup(struct VUT *vut)
(vut->r_arg == NULL ? 0 : 2) > 2)
VUT_Error(vut, 1, "Only one of -n and -r options may be used");
if (vut->r_arg != NULL && !strcmp(vut->r_arg, "-") && vut->D_opt)
VUT_Error(vut, 1, "Daemon cannot read from stdin");
/* Create and validate the query expression */
vut->vslq = VSLQ_New(vut->vsl, NULL,
(enum VSL_grouping_e)vut->g_arg, vut->q_arg);
......
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