{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
- (void)a;
+ CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); /* XXX */
+ VSL(SLT_TTL, sp->fd, "%u VCL %.0f %u", sp->obj->xid, a, sp->t_req);
+ sp->obj->ttl = sp->t_req + a;
+ if (sp->obj->heap_idx != 0)
+ EXP_TTLchange(sp->obj);
}
double
#endif
static time_t
-RFC2616_Ttl(int fd, struct http *hp, time_t t_req, time_t t_resp, struct object *obj)
+RFC2616_Ttl(struct sess *sp, struct http *hp, time_t t_req, time_t t_resp, struct object *obj)
{
int retirement_age;
unsigned u1, u2;
}
/* calculated TTL, Our time, Date, Expires, max-age, age */
- VSL(SLT_TTL, fd, "%d %d %d %d %d %d",
+ VSL(SLT_TTL, sp->fd, "%u RFC %d %d %d %d %d %d", sp->xid,
(int)(ttd - t_req), (int)t_req, (int)h_date, (int)h_expires,
(int)u1, (int)u2);
break;
}
- sp->obj->ttl = RFC2616_Ttl(sp->fd, hp, sp->t_req, sp->t_resp, sp->obj);
+ sp->obj->ttl = RFC2616_Ttl(sp, hp, sp->t_req, sp->t_resp, sp->obj);
sp->obj->entered = sp->t_req;
if (sp->obj->ttl == 0) {
sp->obj->cacheable = 0;