r3774 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Feb 16 16:34:01 CET 2009


Author: phk
Date: 2009-02-16 16:34:00 +0100 (Mon, 16 Feb 2009)
New Revision: 3774

Modified:
   trunk/varnish-cache/bin/varnishd/cache_hash.c
   trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c
Log:
Allow for pass opbjects not having a objcore



Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c	2009-02-16 15:06:18 UTC (rev 3773)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c	2009-02-16 15:34:00 UTC (rev 3774)
@@ -377,11 +377,13 @@
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 	o = sp->obj;
 	CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
-	AN(ObjIsBusy(o));
+	if (o->objcore != NULL)		/* Pass has no objcore */
+		AN(ObjIsBusy(o));
 	assert(o->refcnt > 0);
 	o->ttl = 0;
 	o->cacheable = 0;
-	HSH_Unbusy(sp);
+	if (o->objcore != NULL)		/* Pass has no objcore */
+		HSH_Unbusy(sp);
 	HSH_Deref(&sp->obj);
 }
 

Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c	2009-02-16 15:06:18 UTC (rev 3773)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt_esi.c	2009-02-16 15:34:00 UTC (rev 3774)
@@ -643,7 +643,8 @@
 
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 	CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
-	AN(ObjIsBusy(sp->obj));
+	if (sp->obj->objcore != NULL)	/* Pass has no objcore */
+		AN(ObjIsBusy(sp->obj));
 	if (sp->cur_method != VCL_MET_FETCH) {
 		/* XXX: we should catch this at compile time */
 		WSP(sp, SLT_VCL_error,



More information about the varnish-commit mailing list