]> err.no Git - varnish/commitdiff
Log TTL calculation on the right fd
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 21 Jul 2006 16:05:53 +0000 (16:05 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 21 Jul 2006 16:05:53 +0000 (16:05 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@540 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/rfc2616.c

index eae184a1b2c0e4da40544f016aee587f06b05c85..fbf1cf4bac11de11a626d53809b518cb04d5acb0 100644 (file)
@@ -71,7 +71,7 @@
 #endif
 
 static time_t
-RFC2616_Ttl(struct http *hp, time_t t_req, time_t t_resp, struct object *obj)
+RFC2616_Ttl(int fd, struct http *hp, time_t t_req, time_t t_resp, struct object *obj)
 {
        int retirement_age;
        unsigned u1, u2;
@@ -117,7 +117,7 @@ RFC2616_Ttl(struct http *hp, time_t t_req, time_t t_resp, struct object *obj)
 
                ttd = t_req + retirement_age;
        }
-       VSL(SLT_Debug, 0,
+       VSL(SLT_Debug, fd,
            "TTD: max-age %u Age: %u Date: %d (%d) Expires %d (%d) our_clock %d"
            " -> ttd %d (%d)",
            u1, u2, h_date, h_date - t_req, h_expires, h_expires - t_req, t_req, ttd, ttd - t_req);
@@ -153,7 +153,7 @@ RFC2616_cache_policy(struct sess *sp, struct http *hp)
                break;
        }
 
-       sp->obj->ttl = RFC2616_Ttl(hp, sp->t_req, sp->t_resp, sp->obj);
+       sp->obj->ttl = RFC2616_Ttl(sp->fd, hp, sp->t_req, sp->t_resp, sp->obj);
        sp->obj->entered = sp->t_req;
        if (sp->obj->ttl == 0) {
                sp->obj->cacheable = 0;