From: phk Date: Wed, 6 Sep 2006 18:37:17 +0000 (+0000) Subject: Save a systemcall by using the same timestamp twice. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d36511d18724cc11e818b9e63cdccdcce53bc98;p=varnish Save a systemcall by using the same timestamp twice. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@925 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor.c b/varnish-cache/bin/varnishd/cache_acceptor.c index fa77bf4a..81f6d994 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor.c +++ b/varnish-cache/bin/varnishd/cache_acceptor.c @@ -66,6 +66,7 @@ vca_accept_sess(int fd) XXXAN(sp); (void)clock_gettime(CLOCK_REALTIME, &sp->t_open); + sp->acct.first = sp->t_open.tv_sec; sp->fd = i; sp->id = i; diff --git a/varnish-cache/bin/varnishd/cache_session.c b/varnish-cache/bin/varnishd/cache_session.c index d663ad28..7ec600fb 100644 --- a/varnish-cache/bin/varnishd/cache_session.c +++ b/varnish-cache/bin/varnishd/cache_session.c @@ -244,8 +244,6 @@ SES_New(struct sockaddr *addr, unsigned len) http_Setup(&sm->http, (void *)(sm + 1), sm->workspace); - sm->sess.acct.first = time(NULL); - return (&sm->sess); }