Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent3
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)
...
@@ -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"
);
x
=
dlsym
(
v
->
hdl
,
"Vmod_Name"
);
AN
(
x
);
AN
(
x
);
/* XXX: check that name is correct */
x
=
dlsym
(
v
->
hdl
,
"Vmod_Len"
);
x
=
dlsym
(
v
->
hdl
,
"Vmod_Len"
);
AN
(
x
);
AN
(
x
);
i
=
x
;
i
=
x
;
assert
(
len
==
*
i
)
;
v
->
funclen
=
*
i
;
x
=
dlsym
(
v
->
hdl
,
"Vmod_Func"
);
x
=
dlsym
(
v
->
hdl
,
"Vmod_Func"
);
AN
(
x
);
AN
(
x
);
memcpy
(
ptr
,
x
,
len
);
v
->
funcs
=
x
;
v
->
funcs
=
x
;
v
->
funclen
=
*
i
;
}
}
assert
(
len
==
v
->
funclen
);
memcpy
(
ptr
,
v
->
funcs
,
v
->
funclen
);
v
->
ref
++
;
v
->
ref
++
;
*
hdl
=
v
;
*
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