Commit 30ecc418 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Downgrade all the VRT-var functions from sp to req

parent 931ef7d8
...@@ -277,10 +277,10 @@ VRT_hashdata(const struct sess *sp, const char *str, ...) ...@@ -277,10 +277,10 @@ VRT_hashdata(const struct sess *sp, const char *str, ...)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
double 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()); return (VTIM_real());
} }
......
This diff is collapsed.
...@@ -107,361 +107,361 @@ sp_variables = ( ...@@ -107,361 +107,361 @@ sp_variables = (
'IP', 'IP',
( 'proc',), ( 'proc',),
( ), ( ),
'struct sess *' 'struct req *'
), ),
('client.identity', ('client.identity',
'STRING', 'STRING',
( 'proc',), ( 'proc',),
( 'proc',), ( 'proc',),
'const struct sess *' 'struct req *'
), ),
('server.ip', ('server.ip',
'IP', 'IP',
( 'proc',), ( 'proc',),
( ), ( ),
'struct sess *' 'struct req *'
), ),
('server.hostname', ('server.hostname',
'STRING', 'STRING',
( 'proc',), ( 'proc',),
( ), ( ),
'struct sess *' 'struct req *'
), ),
('server.identity', ('server.identity',
'STRING', 'STRING',
( 'proc',), ( 'proc',),
( ), ( ),
'struct sess *' 'struct req *'
), ),
('server.port', ('server.port',
'INT', 'INT',
( 'proc',), ( 'proc',),
( ), ( ),
'struct sess *' 'struct req *'
), ),
('req.request', ('req.request',
'STRING', 'STRING',
( 'proc',), ( 'proc',),
( 'proc',), ( 'proc',),
'const struct sess *' 'const struct req *'
), ),
('req.url', ('req.url',
'STRING', 'STRING',
( 'proc',), ( 'proc',),
( 'proc',), ( 'proc',),
'const struct sess *' 'const struct req *'
), ),
('req.proto', ('req.proto',
'STRING', 'STRING',
( 'proc',), ( 'proc',),
( 'proc',), ( 'proc',),
'const struct sess *' 'const struct req *'
), ),
('req.http.', ('req.http.',
'HDR_REQ', 'HDR_REQ',
( 'proc',), ( 'proc',),
( 'proc',), ( 'proc',),
'const struct sess *' 'const struct req *'
), ),
('req.backend', ('req.backend',
'BACKEND', 'BACKEND',
( 'proc',), ( 'proc',),
( 'proc',), ( 'proc',),
'const struct sess *' 'struct req *'
), ),
('req.restarts', ('req.restarts',
'INT', 'INT',
( 'proc',), ( 'proc',),
( ), ( ),
'const struct sess *' 'const struct req *'
), ),
('req.esi_level', ('req.esi_level',
'INT', 'INT',
( 'proc',), ( 'proc',),
( ), ( ),
'const struct sess *' 'const struct req *'
), ),
('req.ttl', ('req.ttl',
'DURATION', 'DURATION',
( 'proc',), ( 'proc',),
( 'proc',), ( 'proc',),
'struct sess *' 'struct req *'
), ),
('req.grace', ('req.grace',
'DURATION', 'DURATION',
( 'proc',), ( 'proc',),
( 'proc',), ( 'proc',),
'struct sess *' 'struct req *'
), ),
('req.keep', ('req.keep',
'DURATION', 'DURATION',
( 'proc',), ( 'proc',),
( 'proc',), ( 'proc',),
'struct sess *' 'struct req *'
), ),
('req.xid', ('req.xid',
'STRING', 'STRING',
( 'proc',), ( 'proc',),
( ), ( ),
'struct sess *' 'struct req *'
), ),
('req.esi', ('req.esi',
'BOOL', 'BOOL',
( 'recv', 'fetch', 'deliver', 'error',), ( 'recv', 'fetch', 'deliver', 'error',),
( 'recv', 'fetch', 'deliver', 'error',), ( 'recv', 'fetch', 'deliver', 'error',),
'const struct sess *' 'struct req *'
), ),
('req.can_gzip', ('req.can_gzip',
'BOOL', 'BOOL',
( 'proc',), ( 'proc',),
( ), ( ),
'struct sess *' 'struct req *'
), ),
('req.backend.healthy', ('req.backend.healthy',
'BOOL', 'BOOL',
( 'proc',), ( 'proc',),
( ), ( ),
'const struct sess *' 'struct req *'
), ),
('req.hash_ignore_busy', ('req.hash_ignore_busy',
'BOOL', 'BOOL',
( 'recv',), ( 'recv',),
( 'recv',), ( 'recv',),
'struct sess *' 'struct req *'
), ),
('req.hash_always_miss', ('req.hash_always_miss',
'BOOL', 'BOOL',
( 'recv',), ( 'recv',),
( 'recv',), ( 'recv',),
'struct sess *' 'struct req *'
), ),
('bereq.request', ('bereq.request',
'STRING', 'STRING',
( 'pipe', 'pass', 'miss', 'fetch',), ( 'pipe', 'pass', 'miss', 'fetch',),
( 'pipe', 'pass', 'miss', 'fetch',), ( 'pipe', 'pass', 'miss', 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('bereq.url', ('bereq.url',
'STRING', 'STRING',
( 'pipe', 'pass', 'miss', 'fetch',), ( 'pipe', 'pass', 'miss', 'fetch',),
( 'pipe', 'pass', 'miss', 'fetch',), ( 'pipe', 'pass', 'miss', 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('bereq.proto', ('bereq.proto',
'STRING', 'STRING',
( 'pipe', 'pass', 'miss', 'fetch',), ( 'pipe', 'pass', 'miss', 'fetch',),
( 'pipe', 'pass', 'miss', 'fetch',), ( 'pipe', 'pass', 'miss', 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('bereq.http.', ('bereq.http.',
'HDR_BEREQ', 'HDR_BEREQ',
( 'pipe', 'pass', 'miss', 'fetch',), ( 'pipe', 'pass', 'miss', 'fetch',),
( 'pipe', 'pass', 'miss', 'fetch',), ( 'pipe', 'pass', 'miss', 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('bereq.connect_timeout', ('bereq.connect_timeout',
'DURATION', 'DURATION',
( 'pipe', 'pass', 'miss',), ( 'pipe', 'pass', 'miss',),
( 'pipe', 'pass', 'miss',), ( 'pipe', 'pass', 'miss',),
'struct sess *' 'struct req *'
), ),
('bereq.first_byte_timeout', ('bereq.first_byte_timeout',
'DURATION', 'DURATION',
( 'pass', 'miss',), ( 'pass', 'miss',),
( 'pass', 'miss',), ( 'pass', 'miss',),
'struct sess *' 'struct req *'
), ),
('bereq.between_bytes_timeout', ('bereq.between_bytes_timeout',
'DURATION', 'DURATION',
( 'pass', 'miss',), ( 'pass', 'miss',),
( 'pass', 'miss',), ( 'pass', 'miss',),
'struct sess *' 'struct req *'
), ),
('beresp.proto', ('beresp.proto',
'STRING', 'STRING',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('beresp.saintmode', ('beresp.saintmode',
'DURATION', 'DURATION',
( ), ( ),
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('beresp.status', ('beresp.status',
'INT', 'INT',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('beresp.response', ('beresp.response',
'STRING', 'STRING',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('beresp.http.', ('beresp.http.',
'HDR_BERESP', 'HDR_BERESP',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('beresp.do_esi', ('beresp.do_esi',
'BOOL', 'BOOL',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('beresp.do_stream', ('beresp.do_stream',
'BOOL', 'BOOL',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('beresp.do_gzip', ('beresp.do_gzip',
'BOOL', 'BOOL',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('beresp.do_gunzip', ('beresp.do_gunzip',
'BOOL', 'BOOL',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('beresp.do_pass', ('beresp.do_pass',
'BOOL', 'BOOL',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct req *'
), ),
('beresp.ttl', ('beresp.ttl',
'DURATION', 'DURATION',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'struct sess *' 'struct req *'
), ),
('beresp.grace', ('beresp.grace',
'DURATION', 'DURATION',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'struct sess *' 'struct req *'
), ),
('beresp.keep', ('beresp.keep',
'DURATION', 'DURATION',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'struct sess *' 'struct req *'
), ),
('beresp.backend.name', ('beresp.backend.name',
'STRING', 'STRING',
( 'fetch',), ( 'fetch',),
( ), ( ),
'const struct sess *' 'const struct req *'
), ),
('beresp.backend.ip', ('beresp.backend.ip',
'IP', 'IP',
( 'fetch',), ( 'fetch',),
( ), ( ),
'const struct sess *' 'const struct req *'
), ),
('beresp.backend.port', ('beresp.backend.port',
'INT', 'INT',
( 'fetch',), ( 'fetch',),
( ), ( ),
'const struct sess *' 'const struct req *'
), ),
('beresp.storage', ('beresp.storage',
'STRING', 'STRING',
( 'fetch',), ( 'fetch',),
( 'fetch',), ( 'fetch',),
'struct sess *' 'struct req *'
), ),
('obj.proto', ('obj.proto',
'STRING', 'STRING',
( 'hit', 'error',), ( 'hit', 'error',),
( 'hit', 'error',), ( 'hit', 'error',),
'const struct sess *' 'const struct req *'
), ),
('obj.status', ('obj.status',
'INT', 'INT',
( 'error',), ( 'error',),
( 'error',), ( 'error',),
'const struct sess *' 'const struct req *'
), ),
('obj.response', ('obj.response',
'STRING', 'STRING',
( 'error',), ( 'error',),
( 'error',), ( 'error',),
'const struct sess *' 'const struct req *'
), ),
('obj.hits', ('obj.hits',
'INT', 'INT',
( 'hit', 'deliver',), ( 'hit', 'deliver',),
( ), ( ),
'const struct sess *' 'const struct req *'
), ),
('obj.http.', ('obj.http.',
'HDR_OBJ', 'HDR_OBJ',
( 'hit', 'error',), ( 'hit', 'error',),
( 'error',), # XXX ? ( 'error',), # XXX ?
'const struct sess *' 'const struct req *'
), ),
('obj.ttl', ('obj.ttl',
'DURATION', 'DURATION',
( 'hit', 'error',), ( 'hit', 'error',),
( 'hit', 'error',), ( 'hit', 'error',),
'struct sess *' 'struct req *'
), ),
('obj.grace', ('obj.grace',
'DURATION', 'DURATION',
( 'hit', 'error',), ( 'hit', 'error',),
( 'hit', 'error',), ( 'hit', 'error',),
'struct sess *' 'struct req *'
), ),
('obj.keep', ('obj.keep',
'DURATION', 'DURATION',
( 'hit', 'error',), ( 'hit', 'error',),
( 'hit', 'error',), ( 'hit', 'error',),
'struct sess *' 'struct req *'
), ),
('obj.lastuse', ('obj.lastuse',
'DURATION', 'DURATION',
( 'hit', 'deliver', 'error',), ( 'hit', 'deliver', 'error',),
( ), ( ),
'const struct sess *' 'const struct req *'
), ),
('resp.proto', ('resp.proto',
'STRING', 'STRING',
( 'deliver',), ( 'deliver',),
( 'deliver',), ( 'deliver',),
'const struct sess *' 'const struct req *'
), ),
('resp.status', ('resp.status',
'INT', 'INT',
( 'deliver',), ( 'deliver',),
( 'deliver',), ( 'deliver',),
'const struct sess *' 'const struct req *'
), ),
('resp.response', ('resp.response',
'STRING', 'STRING',
( 'deliver',), ( 'deliver',),
( 'deliver',), ( 'deliver',),
'const struct sess *' 'const struct req *'
), ),
('resp.http.', ('resp.http.',
'HDR_RESP', 'HDR_RESP',
( 'deliver',), ( 'deliver',),
( 'deliver',), ( 'deliver',),
'const struct sess *' 'const struct req *'
), ),
('now', ('now',
'TIME', 'TIME',
( 'all',), ( 'all',),
( ), ( ),
'const struct sess *' 'const struct req *'
), ),
) )
...@@ -831,7 +831,7 @@ for i in sp_variables: ...@@ -831,7 +831,7 @@ for i in sp_variables:
fo.write("\t{ \"%s\", %s, %d,\n" % (i[0], typ, len(i[0]))) fo.write("\t{ \"%s\", %s, %d,\n" % (i[0], typ, len(i[0])))
if len(i[2]) > 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": if typ != "HEADER":
fh.write(ctyp + " VRT_r_%s(%s);\n" % (cnam, i[4])) fh.write(ctyp + " VRT_r_%s(%s);\n" % (cnam, i[4]))
else: else:
...@@ -839,7 +839,7 @@ for i in sp_variables: ...@@ -839,7 +839,7 @@ for i in sp_variables:
restrict(fo, i[2]) restrict(fo, i[2])
if len(i[3]) > 0: 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": if typ != "HEADER":
fh.write("void VRT_l_%s(%s, " % (cnam, i[4])) fh.write("void VRT_l_%s(%s, " % (cnam, i[4]))
if typ != "STRING": if typ != "STRING":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment