r1637 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Tue Jul 3 23:40:14 CEST 2007


Author: phk
Date: 2007-07-03 23:40:14 +0200 (Tue, 03 Jul 2007)
New Revision: 1637

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_center.c
   trunk/varnish-cache/bin/varnishd/cache_pipe.c
Log:
Use sp->bereq for handover to PipeSession


Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2007-07-03 21:38:32 UTC (rev 1636)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2007-07-03 21:40:14 UTC (rev 1637)
@@ -439,7 +439,7 @@
 #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);

Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2007-07-03 21:38:32 UTC (rev 1636)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2007-07-03 21:40:14 UTC (rev 1637)
@@ -651,7 +651,8 @@
 	if (sp->handling == VCL_RET_ERROR)
 		INCOMPL();
 
-	PipeSession(sp, bereq);
+	sp->bereq = bereq;
+	PipeSession(sp);
 	sp->step = STP_DONE;
 	return (0);
 }

Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pipe.c	2007-07-03 21:38:32 UTC (rev 1636)
+++ trunk/varnish-cache/bin/varnishd/cache_pipe.c	2007-07-03 21:40:14 UTC (rev 1637)
@@ -72,17 +72,20 @@
 }
 
 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)




More information about the varnish-commit mailing list