Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
1dfd93b1
Commit
1dfd93b1
authored
Nov 18, 2013
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give error message on -f filter parse errors for VSC (and varnishstat)
parent
26647ab0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
varnishstat.c
bin/varnishstat/varnishstat.c
+1
-0
vsc.c
lib/libvarnishapi/vsc.c
+14
-1
No files found.
bin/varnishstat/varnishstat.c
View file @
1dfd93b1
...
...
@@ -296,6 +296,7 @@ main(int argc, char * const *argv)
default:
if
(
VSC_Arg
(
vd
,
c
,
optarg
)
>
0
)
break
;
fprintf
(
stderr
,
"%s
\n
"
,
VSM_Error
(
vd
));
usage
();
}
}
...
...
lib/libvarnishapi/vsc.c
View file @
1dfd93b1
...
...
@@ -226,6 +226,9 @@ vsc_f_arg(struct VSM_data *vd, const char *opt)
if
(
q
!=
NULL
&&
q
[
1
]
==
'\0'
)
{
*
q
=
'\0'
;
sf
->
flags
|=
VSC_SF_TY_WC
;
}
else
if
(
q
!=
NULL
)
{
i
=
-
1
;
break
;
}
}
if
(
sf
->
ident
!=
NULL
)
{
...
...
@@ -233,6 +236,9 @@ vsc_f_arg(struct VSM_data *vd, const char *opt)
if
(
q
!=
NULL
&&
q
[
1
]
==
'\0'
)
{
*
q
=
'\0'
;
sf
->
flags
|=
VSC_SF_ID_WC
;
}
else
if
(
q
!=
NULL
)
{
i
=
-
1
;
break
;
}
}
if
(
sf
->
name
!=
NULL
)
{
...
...
@@ -240,11 +246,18 @@ vsc_f_arg(struct VSM_data *vd, const char *opt)
if
(
q
!=
NULL
&&
q
[
1
]
==
'\0'
)
{
*
q
=
'\0'
;
sf
->
flags
|=
VSC_SF_NM_WC
;
}
else
if
(
q
!=
NULL
)
{
i
=
-
1
;
break
;
}
}
}
if
(
i
<
0
)
i
=
vsm_diag
(
vd
,
"Wildcard error: %s"
,
opt
);
else
i
=
1
;
VAV_Free
(
av
);
return
(
1
);
return
(
i
);
}
/*--------------------------------------------------------------------*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment