From: phk Date: Wed, 6 Sep 2006 21:52:50 +0000 (+0000) Subject: Move some setup code to first state now that we have it. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=177fa42a5aa7fce5e617e5ac8eb4d109e4d5e529;p=varnish 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 --- 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)