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
a9826591
Commit
a9826591
authored
Aug 27, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give vrt_ctx a "double now" timestamp for use in VCL/VRT/VMODs
parent
cd1c7e89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+5
-0
vrt.h
include/vrt.h
+2
-1
No files found.
bin/varnishd/cache/cache_vcl.c
View file @
a9826591
...
...
@@ -42,6 +42,7 @@
#include "vrt.h"
#include "vcli.h"
#include "vcli_priv.h"
#include "vtim.h"
struct
vcls
{
unsigned
magic
;
...
...
@@ -432,6 +433,7 @@ vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo,
ctx
.
http_req
=
req
->
http
;
ctx
.
http_resp
=
req
->
resp
;
ctx
.
req
=
req
;
ctx
.
now
=
req
->
t_prev
;
}
if
(
bo
!=
NULL
)
{
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
...
...
@@ -440,7 +442,10 @@ vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo,
ctx
.
http_bereq
=
bo
->
bereq
;
ctx
.
http_beresp
=
bo
->
beresp
;
ctx
.
bo
=
bo
;
ctx
.
now
=
bo
->
t_prev
;
}
if
(
ctx
.
now
==
0
)
ctx
.
now
=
VTIM_real
();
ctx
.
ws
=
ws
;
ctx
.
vsl
=
vsl
;
ctx
.
method
=
method
;
...
...
include/vrt.h
View file @
a9826591
...
...
@@ -41,7 +41,7 @@
#define VRT_MAJOR_VERSION 2U
#define VRT_MINOR_VERSION
0
U
#define VRT_MINOR_VERSION
1
U
/***********************************************************************/
...
...
@@ -101,6 +101,7 @@ struct vrt_ctx {
struct
http
*
http_bereq
;
struct
http
*
http_beresp
;
double
now
;
};
/***********************************************************************/
...
...
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