[master] 5ec8dea Give pipe its own local vbc.

Poul-Henning Kamp phk at varnish-cache.org
Mon Dec 5 09:49:35 CET 2011


commit 5ec8dead4585d87ff8742342cdf34cd4aa947eaf
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Dec 5 08:49:20 2011 +0000

    Give pipe its own local vbc.

diff --git a/bin/varnishd/cache/cache_pipe.c b/bin/varnishd/cache/cache_pipe.c
index 9bf8b79..5337eda 100644
--- a/bin/varnishd/cache/cache_pipe.c
+++ b/bin/varnishd/cache/cache_pipe.c
@@ -71,10 +71,9 @@ PipeSession(struct sess *sp)
 	CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
 	w = sp->wrk;
 
-	sp->wrk->vbc = VDI_GetFd(NULL, sp);
-	if (sp->wrk->vbc == NULL)
+	vc = VDI_GetFd(NULL, sp);
+	if (vc == NULL)
 		return;
-	vc = sp->wrk->vbc;
 	(void)VTCP_blocking(vc->fd);
 
 	WRW_Reserve(w, &vc->fd);
@@ -89,7 +88,7 @@ PipeSession(struct sess *sp)
 
 	if (i) {
 		SES_Close(sp, "pipe");
-		VDI_CloseFd(sp->wrk, &sp->wrk->vbc);
+		VDI_CloseFd(sp->wrk, &vc);
 		return;
 	}
 
@@ -129,5 +128,5 @@ PipeSession(struct sess *sp)
 		}
 	}
 	SES_Close(sp, "pipe");
-	VDI_CloseFd(sp->wrk, &sp->wrk->vbc);
+	VDI_CloseFd(sp->wrk, &vc);
 }



More information about the varnish-commit mailing list