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
ee25c1b5
Commit
ee25c1b5
authored
Mar 09, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix argstruct for PRIV_*
PRIV_* arguments are unnamed, so vmodtool names their argstruct members arg%d
parent
744a5e0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
vcc_expr.c
lib/libvcc/vcc_expr.c
+9
-1
No files found.
lib/libvcc/vcc_expr.c
View file @
ee25c1b5
...
...
@@ -468,6 +468,7 @@ vcc_func(struct vcc *tl, struct expr **e, const void *priv,
const
char
*
sa
;
char
ssa
[
64
];
char
ssa2
[
64
];
int
n
;
CAST_OBJ_NOTNULL
(
vv
,
priv
,
VJSN_VAL_MAGIC
);
assert
(
vv
->
type
==
VJSN_ARRAY
);
...
...
@@ -574,7 +575,9 @@ vcc_func(struct vcc *tl, struct expr **e, const void *priv,
e1
=
vcc_mk_expr
(
rfmt
,
"%s(ctx%s,
\v
+(
\n
"
,
cfunc
,
extra
);
else
e1
=
vcc_mk_expr
(
rfmt
,
"%s(ctx%s
\v
+"
,
cfunc
,
extra
);
n
=
0
;
VTAILQ_FOREACH_SAFE
(
fa
,
&
head
,
list
,
fa2
)
{
n
++
;
if
(
fa
->
optional
)
VSB_printf
(
tl
->
curproc
->
prologue
,
" %s.valid_%s = %d;
\n
"
,
sa
,
fa
->
name
,
fa
->
avail
);
...
...
@@ -583,7 +586,12 @@ vcc_func(struct vcc *tl, struct expr **e, const void *priv,
if
(
fa
->
result
==
NULL
&&
fa
->
val
!=
NULL
)
fa
->
result
=
vcc_mk_expr
(
fa
->
type
,
"%s"
,
fa
->
val
);
if
(
fa
->
result
!=
NULL
&&
sa
!=
NULL
)
{
bprintf
(
ssa2
,
"
\v
1%s.%s =
\v
2,
\n
"
,
sa
,
fa
->
name
);
if
(
fa
->
name
&&
*
fa
->
name
!=
'\0'
)
bprintf
(
ssa2
,
"
\v
1%s.%s =
\v
2,
\n
"
,
sa
,
fa
->
name
);
else
bprintf
(
ssa2
,
"
\v
1%s.arg%d =
\v
2,
\n
"
,
sa
,
n
);
e1
=
vcc_expr_edit
(
tl
,
e1
->
fmt
,
ssa2
,
e1
,
fa
->
result
);
}
else
if
(
fa
->
result
!=
NULL
)
{
e1
=
vcc_expr_edit
(
tl
,
e1
->
fmt
,
"
\v
1,
\n\v
2"
,
...
...
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