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
3fe0d1d9
Commit
3fe0d1d9
authored
May 12, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get refcounting and testing thereoff correct in std.fileread()
parent
cd0d4954
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
m00004.vtc
bin/varnishtest/tests/m00004.vtc
+6
-4
vmod_std_fileread.c
lib/libvmod_std/vmod_std_fileread.c
+4
-6
No files found.
bin/varnishtest/tests/m00004.vtc
View file @
3fe0d1d9
...
@@ -76,10 +76,7 @@ varnish v1 -cli "vcl.list"
...
@@ -76,10 +76,7 @@ varnish v1 -cli "vcl.list"
varnish v1 -cli "vcl.discard vcl1"
varnish v1 -cli "vcl.discard vcl1"
varnish v1 -vcl+backend { }
varnish v1 -vcl+backend { }
varnish v1 -cli "vcl.use vcl3"
varnish v1 -cli "vcl.list"
varnish v1 -cli "vcl.discard vcl2"
client c1 {
client c1 {
txreq -url "/one"
txreq -url "/one"
...
@@ -91,3 +88,8 @@ client c1 {
...
@@ -91,3 +88,8 @@ client c1 {
} -run
} -run
varnish v1 -cli "vcl.list"
varnish v1 -cli "vcl.list"
varnish v1 -cli "vcl.discard vcl2"
client c1 -run
varnish v1 -cli "vcl.list"
lib/libvmod_std/vmod_std_fileread.c
View file @
3fe0d1d9
...
@@ -37,12 +37,7 @@
...
@@ -37,12 +37,7 @@
* XXX: underlying file has been updated.
* XXX: underlying file has been updated.
*/
*/
#include <fcntl.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "vrt.h"
#include "vrt.h"
#include "../../bin/varnishd/cache.h"
#include "../../bin/varnishd/cache.h"
...
@@ -101,8 +96,11 @@ vmod_fileread(struct sess *sp, struct vmod_priv *priv, const char *file_name)
...
@@ -101,8 +96,11 @@ vmod_fileread(struct sess *sp, struct vmod_priv *priv, const char *file_name)
}
}
}
}
AZ
(
pthread_mutex_unlock
(
&
frmtx
));
AZ
(
pthread_mutex_unlock
(
&
frmtx
));
if
(
frf
!=
NULL
)
if
(
frf
!=
NULL
)
{
priv
->
free
=
free_frfile
;
priv
->
priv
=
frf
;
return
(
frf
->
contents
);
return
(
frf
->
contents
);
}
s
=
vreadfile
(
NULL
,
file_name
,
NULL
);
s
=
vreadfile
(
NULL
,
file_name
,
NULL
);
if
(
s
!=
NULL
)
{
if
(
s
!=
NULL
)
{
...
...
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