r592 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Tue Aug 1 19:54:34 CEST 2006


Author: phk
Date: 2006-08-01 19:54:34 +0200 (Tue, 01 Aug 2006)
New Revision: 592

Modified:
   trunk/varnish-cache/bin/varnishd/cache_fetch.c
Log:
More miniobj checks


Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c	2006-08-01 16:42:37 UTC (rev 591)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c	2006-08-01 17:54:34 UTC (rev 592)
@@ -293,6 +293,9 @@
 	i = WRK_Flush(w);
 	assert(i == 0);
 
+	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+	CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
+	CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
 	/*
 	 * XXX: It might be cheaper to avoid the event_engine and simply
 	 * XXX: read(2) the header
@@ -300,6 +303,9 @@
 	http_RecvHead(vc->http, vc->fd, w->eb, NULL, NULL);
 	(void)event_base_loop(w->eb, 0);
 	assert(http_DissectResponse(vc->http, vc->fd) == 0);
+	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+	CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
+	CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
 	sp->vbc = vc;
 
 	sp->obj->entered = time(NULL);




More information about the varnish-commit mailing list