From f996b3271ecfc7a69e147d98e1e17232cee6ba4d Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 27 Feb 2009 12:10:01 +0000 Subject: [PATCH] move object twiddling from FetchHdr() to cache_center.c git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3835 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_center.c | 4 ++++ varnish-cache/bin/varnishd/cache_fetch.c | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index a58521e1..e0484750 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -385,7 +385,11 @@ cnt_fetch(struct sess *sp) AN(sp->bereq); AN(sp->director); AZ(sp->vbe); + + sp->obj->xid = sp->xid; + WS_Assert(sp->obj->ws_o); i = FetchHdr(sp); + if (i == 0) i = FetchBody(sp); AZ(sp->wrk->wfd); diff --git a/varnish-cache/bin/varnishd/cache_fetch.c b/varnish-cache/bin/varnishd/cache_fetch.c index 109d0ac5..3c8820ae 100644 --- a/varnish-cache/bin/varnishd/cache_fetch.c +++ b/varnish-cache/bin/varnishd/cache_fetch.c @@ -333,10 +333,6 @@ FetchHdr(struct sess *sp) bereq = sp->bereq; hp = &bereq->http[0]; - sp->obj->xid = sp->xid; - - /* Set up obj's workspace */ - WS_Assert(sp->obj->ws_o); VBE_GetFd(sp); if (sp->vbe == NULL) return (__LINE__); @@ -393,9 +389,7 @@ FetchHdr(struct sess *sp) /* XXX: other cleanup ? */ return (__LINE__); } - return (0); - } /*--------------------------------------------------------------------*/ -- 2.39.5