Commit e9e69b61 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

In preparation for generic types functions, including conversion functions,

rename "RTIME" to "DURATION", to appease the POLA.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4999 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 9db2cf28
......@@ -129,7 +129,7 @@ parse_set(struct vcc *tl)
case INT:
case SIZE:
case TIME:
case RTIME:
case DURATION:
case FLOAT:
if (tl->t->tok != '=')
Fb(tl, 0, "%s %c ", vp->rname, *tl->t->b);
......
......@@ -116,7 +116,7 @@ enum var_type {
FLOAT,
SIZE,
TIME,
RTIME,
DURATION,
STRING,
IP,
HASH,
......
......@@ -128,7 +128,7 @@ struct var vcc_vars[] = {
0,
0,
},
{ "req.grace", RTIME, 9,
{ "req.grace", DURATION, 9,
"VRT_r_req_grace(sp)",
VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
| VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
......@@ -192,21 +192,21 @@ struct var vcc_vars[] = {
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH,
"HDR_BEREQ",
},
{ "bereq.connect_timeout", RTIME, 21,
{ "bereq.connect_timeout", DURATION, 21,
"VRT_r_bereq_connect_timeout(sp)",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS,
"VRT_l_bereq_connect_timeout(sp, ",
VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS,
0,
},
{ "bereq.first_byte_timeout", RTIME, 24,
{ "bereq.first_byte_timeout", DURATION, 24,
"VRT_r_bereq_first_byte_timeout(sp)",
VCL_MET_PASS | VCL_MET_MISS,
"VRT_l_bereq_first_byte_timeout(sp, ",
VCL_MET_PASS | VCL_MET_MISS,
0,
},
{ "bereq.between_bytes_timeout", RTIME, 27,
{ "bereq.between_bytes_timeout", DURATION, 27,
"VRT_r_bereq_between_bytes_timeout(sp)",
VCL_MET_PASS | VCL_MET_MISS,
"VRT_l_bereq_between_bytes_timeout(sp, ",
......@@ -220,7 +220,7 @@ struct var vcc_vars[] = {
VCL_MET_FETCH,
0,
},
{ "beresp.saintmode", RTIME, 16,
{ "beresp.saintmode", DURATION, 16,
NULL, /* No reads allowed */
0,
"VRT_l_beresp_saintmode(sp, ",
......@@ -255,14 +255,14 @@ struct var vcc_vars[] = {
VCL_MET_FETCH,
0,
},
{ "beresp.ttl", RTIME, 10,
{ "beresp.ttl", DURATION, 10,
"VRT_r_beresp_ttl(sp)",
VCL_MET_FETCH,
"VRT_l_beresp_ttl(sp, ",
VCL_MET_FETCH,
0,
},
{ "beresp.grace", RTIME, 12,
{ "beresp.grace", DURATION, 12,
"VRT_r_beresp_grace(sp)",
VCL_MET_FETCH,
"VRT_l_beresp_grace(sp, ",
......@@ -311,21 +311,21 @@ struct var vcc_vars[] = {
VCL_MET_HIT,
0,
},
{ "obj.ttl", RTIME, 7,
{ "obj.ttl", DURATION, 7,
"VRT_r_obj_ttl(sp)",
VCL_MET_HIT | VCL_MET_ERROR,
"VRT_l_obj_ttl(sp, ",
VCL_MET_HIT | VCL_MET_ERROR,
0,
},
{ "obj.grace", RTIME, 9,
{ "obj.grace", DURATION, 9,
"VRT_r_obj_grace(sp)",
VCL_MET_HIT | VCL_MET_ERROR,
"VRT_l_obj_grace(sp, ",
VCL_MET_HIT | VCL_MET_ERROR,
0,
},
{ "obj.lastuse", RTIME, 11,
{ "obj.lastuse", DURATION, 11,
"VRT_r_obj_lastuse(sp)",
VCL_MET_HIT | VCL_MET_DELIVER | VCL_MET_ERROR,
NULL, /* No writes allowed */
......
......@@ -347,7 +347,7 @@ vcc_Cond_2(struct vcc *tl)
case IP: L(tl, vcc_Cond_Ip(vp, tl)); break;
case STRING: L(tl, vcc_Cond_String(vp, tl)); break;
case TIME: L(tl, vcc_Cond_Int(vp, tl)); break;
case RTIME: L(tl, vcc_Cond_Int(vp, tl)); break;
case DURATION: L(tl, vcc_Cond_Int(vp, tl)); break;
case BACKEND: L(tl, vcc_Cond_Backend(vp, tl)); break;
default:
vsb_printf(tl->sb,
......
......@@ -179,7 +179,7 @@ vcc_StringVal(struct vcc *tl)
case TIME:
Fb(tl, 0, "VRT_time_string(sp, %s)", vp->rname);
break;
case RTIME:
case DURATION:
Fb(tl, 0, "VRT_double_string(sp, %s)", vp->rname);
break;
case BACKEND:
......
......@@ -140,7 +140,7 @@ vcc_VarVal(struct vcc *tl, const struct var *vp, const struct token *vt)
vcc_TimeVal(tl, &d);
ERRCHK(tl);
Fb(tl, 0, "%g", d);
} else if (vp->fmt == RTIME) {
} else if (vp->fmt == DURATION) {
vcc_RTimeVal(tl, &d);
ERRCHK(tl);
Fb(tl, 0, "%g", d);
......
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