]> err.no Git - varnish/commitdiff
Move some setup code to first state now that we have it.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 6 Sep 2006 21:52:50 +0000 (21:52 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 6 Sep 2006 21:52:50 +0000 (21:52 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@933 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_center.c
varnish-cache/bin/varnishd/cache_pool.c

index 0416342f8e7711d91c3b2939c4739c1618fc6f3e..91c79331cafb6ea675829246ac555baa2a46d043 100644 (file)
@@ -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) {
index 59102cc2787d7e35d8456807819086d0254d1aed..09d5a817d90d0b0c95ffbe5a43cdb6c36f7939f4 100644 (file)
@@ -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)