r876 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Aug 21 21:05:57 CEST 2006


Author: phk
Date: 2006-08-21 21:05:57 +0200 (Mon, 21 Aug 2006)
New Revision: 876

Modified:
   trunk/varnish-cache/bin/varnishd/cache_acceptor.c
Log:
Add asserts.

Return if we pass on directly.


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.c	2006-08-21 18:55:24 UTC (rev 875)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c	2006-08-21 19:05:57 UTC (rev 876)
@@ -161,11 +161,15 @@
 {
 
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+	assert(sp->obj == NULL);
+	assert(sp->vcl == NULL);
 	if (sp->fd >= 0) {
 		VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port);
 		(void)clock_gettime(CLOCK_REALTIME, &sp->t_open);
-		if (http_RecvPrepAgain(sp->http))
+		if (http_RecvPrepAgain(sp->http)) {
 			vca_handover(sp, 0);
+			return;
+		}
 	}
 	vca_acceptors[0]->recycle(sp);
 }




More information about the varnish-commit mailing list