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
3a56dbdd
Commit
3a56dbdd
authored
Mar 28, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also correctly initialize subsequent references to vmods.
Fixes: 878 Solved by: tmagnien
parent
27422d81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
4 deletions
+49
-4
cache_vrt_vmod.c
bin/varnishd/cache_vrt_vmod.c
+5
-4
r00878.vtc
bin/varnishtest/tests/r00878.vtc
+44
-0
No files found.
bin/varnishd/cache_vrt_vmod.c
View file @
3a56dbdd
...
...
@@ -90,19 +90,20 @@ VRT_Vmod_Init(void **hdl, void *ptr, int len, const char *nm, const char *path)
x
=
dlsym
(
v
->
hdl
,
"Vmod_Name"
);
AN
(
x
);
/* XXX: check that name is correct */
x
=
dlsym
(
v
->
hdl
,
"Vmod_Len"
);
AN
(
x
);
i
=
x
;
assert
(
len
==
*
i
)
;
v
->
funclen
=
*
i
;
x
=
dlsym
(
v
->
hdl
,
"Vmod_Func"
);
AN
(
x
);
memcpy
(
ptr
,
x
,
len
);
v
->
funcs
=
x
;
v
->
funclen
=
*
i
;
}
assert
(
len
==
v
->
funclen
);
memcpy
(
ptr
,
v
->
funcs
,
v
->
funclen
);
v
->
ref
++
;
*
hdl
=
v
;
...
...
bin/varnishtest/tests/r00878.vtc
0 → 100644
View file @
3a56dbdd
#!/bin/sh
test
"Loading vmods in subsequent VCLs"
server s1
{
rxreq
txresp
-bodylen
4
}
-start
varnish v1
-vcl
+backend
{
import std from
"
${
topbuild
}
/lib/libvmod_std/.libs/libvmod_std.so"
;
sub vcl_deliver
{
set
resp.http.who
=
std.author
(
phk
)
;
}
}
-start
client c1
{
txreq
rxresp
}
-run
varnish v1
-vcl
+backend
{
import std from
"
${
topbuild
}
/lib/libvmod_std/.libs/libvmod_std.so"
;
sub vcl_deliver
{
set
resp.http.who
=
std.author
(
des
)
;
}
}
client c1
{
txreq
rxresp
}
-run
varnish v1
-vcl
+backend
{
import std from
"
${
topbuild
}
/lib/libvmod_std/.libs/libvmod_std.so"
;
sub vcl_deliver
{
set
resp.http.who
=
std.author
(
kristian
)
;
}
}
client c1
{
txreq
rxresp
}
-run
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