r2093 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Oct 8 17:34:32 CEST 2007


Author: phk
Date: 2007-10-08 17:34:32 +0200 (Mon, 08 Oct 2007)
New Revision: 2093

Modified:
   trunk/varnish-cache/bin/varnishd/cache_acceptor.c
   trunk/varnish-cache/bin/varnishd/cache_center.c
   trunk/varnish-cache/bin/varnishd/cache_pool.c
Log:
Don't use vca_return_session() when we can SES_Delete()


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.c	2007-10-08 14:12:06 UTC (rev 2092)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c	2007-10-08 15:34:32 UTC (rev 2093)
@@ -246,10 +246,8 @@
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 	AZ(sp->obj);
 	AZ(sp->vcl);
-	if (sp->fd < 0)
-		SES_Delete(sp);
-	else
-		assert(sizeof sp == write(vca_pipes[1], &sp, sizeof sp));
+	assert(sp->fd >= 0);
+	assert(sizeof sp == write(vca_pipes[1], &sp, sizeof sp));
 }
 
 

Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2007-10-08 14:12:06 UTC (rev 2092)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2007-10-08 15:34:32 UTC (rev 2093)
@@ -217,7 +217,7 @@
 		VSL_stats->sess_closed++;
 		assert(!isnan(sp->wrk->used));
 		sp->wrk = NULL;
-		vca_return_session(sp);
+		SES_Delete(sp);
 		return (1);
 	}
 

Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c	2007-10-08 14:12:06 UTC (rev 2092)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c	2007-10-08 15:34:32 UTC (rev 2093)
@@ -313,7 +313,7 @@
 		UNLOCK(&tmtx);
 		sp->t_end = TIM_real();
 		vca_close_session(sp, "dropped");
-		vca_return_session(sp);
+		SES_Delete(sp);
 		return;
 	}
 	/*




More information about the varnish-commit mailing list