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
5db1061f
Commit
5db1061f
authored
Jun 20, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change VRT_hashdata() to take STRANDS
parent
dffae17c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
14 deletions
+8
-14
cache_vrt.c
bin/varnishd/cache/cache_vrt.c
+5
-12
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 @
5db1061f
...
...
@@ -555,23 +555,16 @@ VRT_fail(VRT_CTX, const char *fmt, ...)
*/
VCL_VOID
VRT_hashdata
(
VRT_CTX
,
const
char
*
str
,
...
)
VRT_hashdata
(
VRT_CTX
,
VCL_STRANDS
s
)
{
va_list
ap
;
const
char
*
p
;
int
i
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
->
req
,
REQ_MAGIC
);
AN
(
ctx
->
specific
);
HSH_AddString
(
ctx
->
req
,
ctx
->
specific
,
str
);
va_start
(
ap
,
str
);
while
(
1
)
{
p
=
va_arg
(
ap
,
const
char
*
);
if
(
p
==
vrt_magic_string_end
)
break
;
HSH_AddString
(
ctx
->
req
,
ctx
->
specific
,
p
);
}
va_end
(
ap
);
AN
(
s
);
for
(
i
=
0
;
i
<
s
->
n
;
i
++
)
HSH_AddString
(
ctx
->
req
,
ctx
->
specific
,
s
->
p
[
i
]);
/*
* Add a 'field-separator' to make it more difficult to
* manipulate the hash.
...
...
include/vrt.h
View file @
5db1061f
...
...
@@ -52,6 +52,7 @@
* binary/load-time compatible, increment MAJOR version
*
* unreleased (planned for 2019-09-15)
* VRT_hashdata() now takes STRANDS argument
* VCL_BOOL VRT_Strands2Bool(VCL_STRANDS) added.
* VRT_BundleStrands() moved to vcc_interface.h
* VRT_VCL_{Busy|Unbusy} changed to VRT_VCL_{Prevent|Allow}_Cold
...
...
@@ -438,7 +439,7 @@ VCL_VOID VRT_hit_for_pass(VRT_CTX, VCL_DURATION);
VCL_VOID
VRT_SetHdr
(
VRT_CTX
,
VCL_HEADER
,
const
char
*
,
...);
VCL_VOID
VRT_handling
(
VRT_CTX
,
unsigned
hand
);
VCL_VOID
VRT_fail
(
VRT_CTX
,
const
char
*
fmt
,
...)
v_printflike_
(
2
,
3
);
VCL_VOID
VRT_hashdata
(
VRT_CTX
,
const
char
*
str
,
...
);
VCL_VOID
VRT_hashdata
(
VRT_CTX
,
VCL_STRANDS
);
/* Simple stuff */
int
VRT_strcmp
(
const
char
*
s1
,
const
char
*
s2
);
...
...
lib/libvcc/vcc_action.c
View file @
5db1061f
...
...
@@ -193,7 +193,7 @@ vcc_act_hash_data(struct vcc *tl, struct token *t, struct symbol *sym)
SkipToken
(
tl
,
'('
);
Fb
(
tl
,
1
,
"VRT_hashdata(ctx,
\n
"
);
vcc_Expr
(
tl
,
STR
ING_LIST
);
vcc_Expr
(
tl
,
STR
ANDS
);
ERRCHK
(
tl
);
Fb
(
tl
,
1
,
");
\n
"
);
SkipToken
(
tl
,
')'
);
...
...
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