]> err.no Git - varnish/commitdiff
Initialize all timestamps in the session to NAN
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 13 Jul 2007 07:11:54 +0000 (07:11 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 13 Jul 2007 07:11:54 +0000 (07:11 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1682 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_session.c

index e58fe494db6c2d521a794297ecab6a45153453c8..99d012e7e1ef7927772d445f99356e7bdd045f37 100644 (file)
@@ -300,6 +300,7 @@ struct sess {
        const char              *doclose;
        struct http             *http;
 
+       /* Timestamps, all on TIM_real() timescale */
        double                  t_open;
        double                  t_req;
        double                  t_resp;
index 5833d838cd4d88b5184858d911aabe48805a4dda..d4efdfb0c982e32ab4ef0c07def4498c63b06f52 100644 (file)
@@ -50,6 +50,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <sys/uio.h>
 #include <sys/socket.h>
 
@@ -308,6 +309,10 @@ SES_New(struct sockaddr *addr, unsigned len)
        sp->mysockaddr = (void*)(&sm->sockaddr[1]);
        sp->mysockaddrlen = sizeof(sm->sockaddr[1]);
        sp->sockaddr->sa_family = sp->mysockaddr->sa_family = PF_UNSPEC;
+       sp->t_open = NAN;
+       sp->t_req = NAN;
+       sp->t_resp = NAN;
+       sp->t_end = NAN;
 
        assert(len <= sp->sockaddrlen);
        if (addr != NULL) {