From 177fa42a5aa7fce5e617e5ac8eb4d109e4d5e529 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 6 Sep 2006 21:52:50 +0000 Subject: [PATCH] Move some setup code to first state now that we have it. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@933 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_center.c | 2 ++ varnish-cache/bin/varnishd/cache_pool.c | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index 0416342f..91c79331 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -240,6 +240,8 @@ cnt_first(struct sess *sp) int i; VCA_Prep(sp); + sp->wrk->acct.sess++; + SES_RefSrcAddr(sp); for (;;) { i = http_RecvSome(sp->fd, sp->http); switch (i) { diff --git a/varnish-cache/bin/varnishd/cache_pool.c b/varnish-cache/bin/varnishd/cache_pool.c index 59102cc2..09d5a817 100644 --- a/varnish-cache/bin/varnishd/cache_pool.c +++ b/varnish-cache/bin/varnishd/cache_pool.c @@ -138,10 +138,6 @@ wrk_do_one(struct worker *w) CHECK_OBJ_NOTNULL(wrq->sess, SESS_MAGIC); wrq->sess->wrk = w; w->wrq = wrq; - if (wrq->sess->srcaddr == NULL) { - w->acct.sess++; - SES_RefSrcAddr(wrq->sess); - } if (w->nobj != NULL) CHECK_OBJ(w->nobj, OBJECT_MAGIC); if (w->nobjhead != NULL) -- 2.39.5