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
5f67d3ae
Commit
5f67d3ae
authored
Jan 15, 2024
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slight reshuffling of some lines of code.
parent
c44bd67f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
vcli_serve.c
lib/libvarnish/vcli_serve.c
+16
-14
No files found.
lib/libvarnish/vcli_serve.c
View file @
5f67d3ae
...
...
@@ -212,14 +212,27 @@ VCLS_func_help_json(struct cli *cli, const char * const *av, void *priv)
*/
static
void
cls_dispatch
(
struct
cli
*
cli
,
const
struct
cli_proto
*
cp
,
char
*
const
*
av
,
int
ac
)
cls_dispatch
(
struct
cli
*
cli
,
struct
VCLS
*
cs
,
char
*
const
*
av
,
int
ac
)
{
int
json
=
0
;
struct
cli_proto
*
cp
;
AN
(
av
);
assert
(
ac
>=
0
);
VTAILQ_FOREACH
(
cp
,
&
cs
->
funcs
,
list
)
{
if
(
cp
->
auth
>
cli
->
auth
)
continue
;
if
(
!
strcmp
(
cp
->
desc
->
request
,
av
[
1
]))
break
;
}
if
(
cp
==
NULL
&&
cs
->
wildcard
&&
cs
->
wildcard
->
auth
<=
cli
->
auth
)
cp
=
cs
->
wildcard
;
if
(
cp
==
NULL
)
return
;
VSB_clear
(
cli
->
sb
);
if
(
ac
>
1
&&
!
strcmp
(
av
[
2
],
"-j"
))
...
...
@@ -263,7 +276,6 @@ static int
cls_exec
(
struct
VCLS_fd
*
cfd
,
char
*
const
*
av
)
{
struct
VCLS
*
cs
;
struct
cli_proto
*
clp
;
struct
cli
*
cli
;
int
na
;
ssize_t
len
;
...
...
@@ -313,17 +325,7 @@ cls_exec(struct VCLS_fd *cfd, char * const *av)
for
(
na
=
0
;
av
[
na
+
1
]
!=
NULL
;
na
++
)
continue
;
VTAILQ_FOREACH
(
clp
,
&
cs
->
funcs
,
list
)
{
if
(
clp
->
auth
>
cli
->
auth
)
continue
;
if
(
!
strcmp
(
clp
->
desc
->
request
,
av
[
1
]))
{
cls_dispatch
(
cli
,
clp
,
av
,
na
);
break
;
}
}
if
(
clp
==
NULL
&&
cs
->
wildcard
&&
cs
->
wildcard
->
auth
<=
cli
->
auth
)
cls_dispatch
(
cli
,
cs
->
wildcard
,
av
,
na
);
cls_dispatch
(
cli
,
cs
,
av
,
na
);
}
while
(
0
);
...
...
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