From 48f096246ce8b30157642bf1ce1c6e162a396406 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 3 Jul 2007 21:40:14 +0000 Subject: [PATCH] Use sp->bereq for handover to PipeSession git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1637 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache.h | 2 +- varnish-cache/bin/varnishd/cache_center.c | 3 ++- varnish-cache/bin/varnishd/cache_pipe.c | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index 9cb40258..b15e84ec 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -439,7 +439,7 @@ void http_CopyHome(struct worker *w, int fd, struct http *hp); #undef HTTPH /* cache_pipe.c */ -void PipeSession(struct sess *sp, struct bereq *bereq); +void PipeSession(struct sess *sp); /* cache_pool.c */ void WRK_Init(void); diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index 5965083a..d9b871cd 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -651,7 +651,8 @@ cnt_pipe(struct sess *sp) if (sp->handling == VCL_RET_ERROR) INCOMPL(); - PipeSession(sp, bereq); + sp->bereq = bereq; + PipeSession(sp); sp->step = STP_DONE; return (0); } diff --git a/varnish-cache/bin/varnishd/cache_pipe.c b/varnish-cache/bin/varnishd/cache_pipe.c index f3244451..195ec0fc 100644 --- a/varnish-cache/bin/varnishd/cache_pipe.c +++ b/varnish-cache/bin/varnishd/cache_pipe.c @@ -72,17 +72,20 @@ rdf(struct pollfd *fds, int idx) } void -PipeSession(struct sess *sp, struct bereq *bereq) +PipeSession(struct sess *sp) { struct vbe_conn *vc; char *b, *e; struct worker *w; + struct bereq *bereq; struct pollfd fds[2]; int i; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); w = sp->wrk; + bereq = sp->bereq; + sp->bereq = NULL; vc = VBE_GetFd(sp); if (vc == NULL) -- 2.39.5