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
43cc2827
Commit
43cc2827
authored
Aug 27, 2014
by
Poul-Henning Kamp
Committed by
Lasse Karstensen
Sep 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give vrt_ctx a "double now" timestamp for use in VCL/VRT/VMODs
Conflicts: bin/varnishd/cache/cache_vcl.c include/vrt.h
parent
746e41c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+5
-0
vrt.h
include/vrt.h
+1
-0
No files found.
bin/varnishd/cache/cache_vcl.c
View file @
43cc2827
...
...
@@ -42,6 +42,7 @@
#include "vrt.h"
#include "vcli.h"
#include "vcli_priv.h"
#include "vtim.h"
struct
vcls
{
unsigned
magic
;
...
...
@@ -436,6 +437,7 @@ vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo,
ctx
.
req
=
req
;
if
(
req
->
obj
)
ctx
.
http_obj
=
req
->
obj
->
http
;
ctx
.
now
=
req
->
t_prev
;
}
if
(
bo
!=
NULL
)
{
// AZ(req);
...
...
@@ -446,7 +448,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
.
method
=
method
;
ctx
.
handling
=
&
wrk
->
handling
;
...
...
include/vrt.h
View file @
43cc2827
...
...
@@ -102,6 +102,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