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
f0de32ec
Commit
f0de32ec
authored
Jun 20, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert VRT_synth_page() to take STRANDS
parent
5db1061f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
17 deletions
+11
-17
cache_vrt.c
bin/varnishd/cache/cache_vrt.c
+8
-15
vrt.h
include/vrt.h
+2
-1
vcc_action.c
lib/libvcc/vcc_action.c
+1
-1
No files found.
bin/varnishd/cache/cache_vrt.c
View file @
f0de32ec
...
...
@@ -675,26 +675,19 @@ VRT_Rollback(VRT_CTX, VCL_HTTP hp)
/*--------------------------------------------------------------------*/
VCL_VOID
VRT_synth_page
(
VRT_CTX
,
const
char
*
str
,
...
)
VRT_synth_page
(
VRT_CTX
,
VCL_STRANDS
s
)
{
va_list
ap
;
const
char
*
p
;
struct
vsb
*
vsb
;
int
i
;
CAST_OBJ_NOTNULL
(
vsb
,
ctx
->
specific
,
VSB_MAGIC
);
va_start
(
ap
,
str
);
p
=
str
;
while
(
p
!=
vrt_magic_string_end
)
{
if
(
p
==
NULL
)
p
=
"(null)"
;
if
(
VSB_cat
(
vsb
,
p
))
{
VRT_fail
(
ctx
,
"synthetic(): %s"
,
vstrerror
(
VSB_error
(
vsb
)));
break
;
}
p
=
va_arg
(
ap
,
const
char
*
);
AN
(
s
);
for
(
i
=
0
;
i
<
s
->
n
;
i
++
)
{
if
(
s
->
p
[
i
]
!=
NULL
)
VSB_cat
(
vsb
,
s
->
p
[
i
]);
else
VSB_cat
(
vsb
,
"(null)"
);
}
va_end
(
ap
);
}
/*--------------------------------------------------------------------*/
...
...
include/vrt.h
View file @
f0de32ec
...
...
@@ -52,6 +52,7 @@
* binary/load-time compatible, increment MAJOR version
*
* unreleased (planned for 2019-09-15)
* VRT_synth_page now takes STRANDS argument
* VRT_hashdata() now takes STRANDS argument
* VCL_BOOL VRT_Strands2Bool(VCL_STRANDS) added.
* VRT_BundleStrands() moved to vcc_interface.h
...
...
@@ -450,7 +451,7 @@ VCL_BLOB VRT_blob(VRT_CTX, const char *, const void *, size_t, unsigned);
VCL_VOID
VRT_Rollback
(
VRT_CTX
,
VCL_HTTP
);
/* Synthetic pages */
VCL_VOID
VRT_synth_page
(
VRT_CTX
,
const
char
*
,
...
);
VCL_VOID
VRT_synth_page
(
VRT_CTX
,
VCL_STRANDS
);
/* Backend related */
VCL_BACKEND
VRT_new_backend
(
VRT_CTX
,
const
struct
vrt_backend
*
);
...
...
lib/libvcc/vcc_action.c
View file @
f0de32ec
...
...
@@ -375,7 +375,7 @@ vcc_act_synthetic(struct vcc *tl, struct token *t, struct symbol *sym)
vcc_NextToken
(
tl
);
Fb
(
tl
,
1
,
"VRT_synth_page(ctx, "
);
vcc_Expr
(
tl
,
STR
ING_LIST
);
vcc_Expr
(
tl
,
STR
ANDS
);
ERRCHK
(
tl
);
Fb
(
tl
,
1
,
");
\n
"
);
...
...
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