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
30ecc418
Commit
30ecc418
authored
Jun 14, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Downgrade all the VRT-var functions from sp to req
parent
931ef7d8
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
236 additions
and
229 deletions
+236
-229
cache_vrt.c
bin/varnishd/cache/cache_vrt.c
+2
-2
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+172
-165
generate.py
lib/libvcl/generate.py
+62
-62
No files found.
bin/varnishd/cache/cache_vrt.c
View file @
30ecc418
...
...
@@ -277,10 +277,10 @@ VRT_hashdata(const struct sess *sp, const char *str, ...)
/*--------------------------------------------------------------------*/
double
VRT_r_now
(
const
struct
sess
*
sp
)
VRT_r_now
(
const
struct
req
*
req
)
{
(
void
)
sp
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
)
;
return
(
VTIM_real
());
}
...
...
bin/varnishd/cache/cache_vrt_var.c
View file @
30ecc418
This diff is collapsed.
Click to expand it.
lib/libvcl/generate.py
View file @
30ecc418
...
...
@@ -107,361 +107,361 @@ sp_variables = (
'IP'
,
(
'proc'
,),
(
),
'struct
sess
*'
'struct
req
*'
),
(
'client.identity'
,
'STRING'
,
(
'proc'
,),
(
'proc'
,),
'
const struct sess
*'
'
struct req
*'
),
(
'server.ip'
,
'IP'
,
(
'proc'
,),
(
),
'struct
sess
*'
'struct
req
*'
),
(
'server.hostname'
,
'STRING'
,
(
'proc'
,),
(
),
'struct
sess
*'
'struct
req
*'
),
(
'server.identity'
,
'STRING'
,
(
'proc'
,),
(
),
'struct
sess
*'
'struct
req
*'
),
(
'server.port'
,
'INT'
,
(
'proc'
,),
(
),
'struct
sess
*'
'struct
req
*'
),
(
'req.request'
,
'STRING'
,
(
'proc'
,),
(
'proc'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'req.url'
,
'STRING'
,
(
'proc'
,),
(
'proc'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'req.proto'
,
'STRING'
,
(
'proc'
,),
(
'proc'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'req.http.'
,
'HDR_REQ'
,
(
'proc'
,),
(
'proc'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'req.backend'
,
'BACKEND'
,
(
'proc'
,),
(
'proc'
,),
'
const struct sess
*'
'
struct req
*'
),
(
'req.restarts'
,
'INT'
,
(
'proc'
,),
(
),
'const struct
sess
*'
'const struct
req
*'
),
(
'req.esi_level'
,
'INT'
,
(
'proc'
,),
(
),
'const struct
sess
*'
'const struct
req
*'
),
(
'req.ttl'
,
'DURATION'
,
(
'proc'
,),
(
'proc'
,),
'struct
sess
*'
'struct
req
*'
),
(
'req.grace'
,
'DURATION'
,
(
'proc'
,),
(
'proc'
,),
'struct
sess
*'
'struct
req
*'
),
(
'req.keep'
,
'DURATION'
,
(
'proc'
,),
(
'proc'
,),
'struct
sess
*'
'struct
req
*'
),
(
'req.xid'
,
'STRING'
,
(
'proc'
,),
(
),
'struct
sess
*'
'struct
req
*'
),
(
'req.esi'
,
'BOOL'
,
(
'recv'
,
'fetch'
,
'deliver'
,
'error'
,),
(
'recv'
,
'fetch'
,
'deliver'
,
'error'
,),
'
const struct sess
*'
'
struct req
*'
),
(
'req.can_gzip'
,
'BOOL'
,
(
'proc'
,),
(
),
'struct
sess
*'
'struct
req
*'
),
(
'req.backend.healthy'
,
'BOOL'
,
(
'proc'
,),
(
),
'
const struct sess
*'
'
struct req
*'
),
(
'req.hash_ignore_busy'
,
'BOOL'
,
(
'recv'
,),
(
'recv'
,),
'struct
sess
*'
'struct
req
*'
),
(
'req.hash_always_miss'
,
'BOOL'
,
(
'recv'
,),
(
'recv'
,),
'struct
sess
*'
'struct
req
*'
),
(
'bereq.request'
,
'STRING'
,
(
'pipe'
,
'pass'
,
'miss'
,
'fetch'
,),
(
'pipe'
,
'pass'
,
'miss'
,
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'bereq.url'
,
'STRING'
,
(
'pipe'
,
'pass'
,
'miss'
,
'fetch'
,),
(
'pipe'
,
'pass'
,
'miss'
,
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'bereq.proto'
,
'STRING'
,
(
'pipe'
,
'pass'
,
'miss'
,
'fetch'
,),
(
'pipe'
,
'pass'
,
'miss'
,
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'bereq.http.'
,
'HDR_BEREQ'
,
(
'pipe'
,
'pass'
,
'miss'
,
'fetch'
,),
(
'pipe'
,
'pass'
,
'miss'
,
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'bereq.connect_timeout'
,
'DURATION'
,
(
'pipe'
,
'pass'
,
'miss'
,),
(
'pipe'
,
'pass'
,
'miss'
,),
'struct
sess
*'
'struct
req
*'
),
(
'bereq.first_byte_timeout'
,
'DURATION'
,
(
'pass'
,
'miss'
,),
(
'pass'
,
'miss'
,),
'struct
sess
*'
'struct
req
*'
),
(
'bereq.between_bytes_timeout'
,
'DURATION'
,
(
'pass'
,
'miss'
,),
(
'pass'
,
'miss'
,),
'struct
sess
*'
'struct
req
*'
),
(
'beresp.proto'
,
'STRING'
,
(
'fetch'
,),
(
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.saintmode'
,
'DURATION'
,
(
),
(
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.status'
,
'INT'
,
(
'fetch'
,),
(
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.response'
,
'STRING'
,
(
'fetch'
,),
(
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.http.'
,
'HDR_BERESP'
,
(
'fetch'
,),
(
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.do_esi'
,
'BOOL'
,
(
'fetch'
,),
(
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.do_stream'
,
'BOOL'
,
(
'fetch'
,),
(
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.do_gzip'
,
'BOOL'
,
(
'fetch'
,),
(
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.do_gunzip'
,
'BOOL'
,
(
'fetch'
,),
(
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.do_pass'
,
'BOOL'
,
(
'fetch'
,),
(
'fetch'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.ttl'
,
'DURATION'
,
(
'fetch'
,),
(
'fetch'
,),
'struct
sess
*'
'struct
req
*'
),
(
'beresp.grace'
,
'DURATION'
,
(
'fetch'
,),
(
'fetch'
,),
'struct
sess
*'
'struct
req
*'
),
(
'beresp.keep'
,
'DURATION'
,
(
'fetch'
,),
(
'fetch'
,),
'struct
sess
*'
'struct
req
*'
),
(
'beresp.backend.name'
,
'STRING'
,
(
'fetch'
,),
(
),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.backend.ip'
,
'IP'
,
(
'fetch'
,),
(
),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.backend.port'
,
'INT'
,
(
'fetch'
,),
(
),
'const struct
sess
*'
'const struct
req
*'
),
(
'beresp.storage'
,
'STRING'
,
(
'fetch'
,),
(
'fetch'
,),
'struct
sess
*'
'struct
req
*'
),
(
'obj.proto'
,
'STRING'
,
(
'hit'
,
'error'
,),
(
'hit'
,
'error'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'obj.status'
,
'INT'
,
(
'error'
,),
(
'error'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'obj.response'
,
'STRING'
,
(
'error'
,),
(
'error'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'obj.hits'
,
'INT'
,
(
'hit'
,
'deliver'
,),
(
),
'const struct
sess
*'
'const struct
req
*'
),
(
'obj.http.'
,
'HDR_OBJ'
,
(
'hit'
,
'error'
,),
(
'error'
,),
# XXX ?
'const struct
sess
*'
'const struct
req
*'
),
(
'obj.ttl'
,
'DURATION'
,
(
'hit'
,
'error'
,),
(
'hit'
,
'error'
,),
'struct
sess
*'
'struct
req
*'
),
(
'obj.grace'
,
'DURATION'
,
(
'hit'
,
'error'
,),
(
'hit'
,
'error'
,),
'struct
sess
*'
'struct
req
*'
),
(
'obj.keep'
,
'DURATION'
,
(
'hit'
,
'error'
,),
(
'hit'
,
'error'
,),
'struct
sess
*'
'struct
req
*'
),
(
'obj.lastuse'
,
'DURATION'
,
(
'hit'
,
'deliver'
,
'error'
,),
(
),
'const struct
sess
*'
'const struct
req
*'
),
(
'resp.proto'
,
'STRING'
,
(
'deliver'
,),
(
'deliver'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'resp.status'
,
'INT'
,
(
'deliver'
,),
(
'deliver'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'resp.response'
,
'STRING'
,
(
'deliver'
,),
(
'deliver'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'resp.http.'
,
'HDR_RESP'
,
(
'deliver'
,),
(
'deliver'
,),
'const struct
sess
*'
'const struct
req
*'
),
(
'now'
,
'TIME'
,
(
'all'
,),
(
),
'const struct
sess
*'
'const struct
req
*'
),
)
...
...
@@ -831,7 +831,7 @@ for i in sp_variables:
fo
.
write
(
"
\t
{
\"
%
s
\"
,
%
s,
%
d,
\n
"
%
(
i
[
0
],
typ
,
len
(
i
[
0
])))
if
len
(
i
[
2
])
>
0
:
fo
.
write
(
'
\t
"VRT_r_
%
s(
sp
)",
\n
'
%
cnam
)
fo
.
write
(
'
\t
"VRT_r_
%
s(
req
)",
\n
'
%
cnam
)
if
typ
!=
"HEADER"
:
fh
.
write
(
ctyp
+
" VRT_r_
%
s(
%
s);
\n
"
%
(
cnam
,
i
[
4
]))
else
:
...
...
@@ -839,7 +839,7 @@ for i in sp_variables:
restrict
(
fo
,
i
[
2
])
if
len
(
i
[
3
])
>
0
:
fo
.
write
(
'
\t
"VRT_l_
%
s(
sp
, ",
\n
'
%
cnam
)
fo
.
write
(
'
\t
"VRT_l_
%
s(
req
, ",
\n
'
%
cnam
)
if
typ
!=
"HEADER"
:
fh
.
write
(
"void VRT_l_
%
s(
%
s, "
%
(
cnam
,
i
[
4
]))
if
typ
!=
"STRING"
:
...
...
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