From f14a68df540bc61dca3df0edc2ff609fe468dbd3 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 16 Feb 2009 15:34:00 +0000 Subject: [PATCH] Allow for pass opbjects not having a objcore git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3774 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_hash.c | 6 ++++-- varnish-cache/bin/varnishd/cache_vrt_esi.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_hash.c b/varnish-cache/bin/varnishd/cache_hash.c index 8049a2d1..f5efca26 100644 --- a/varnish-cache/bin/varnishd/cache_hash.c +++ b/varnish-cache/bin/varnishd/cache_hash.c @@ -377,11 +377,13 @@ HSH_Drop(struct sess *sp) 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); } diff --git a/varnish-cache/bin/varnishd/cache_vrt_esi.c b/varnish-cache/bin/varnishd/cache_vrt_esi.c index d92c628f..74ebbd02 100644 --- a/varnish-cache/bin/varnishd/cache_vrt_esi.c +++ b/varnish-cache/bin/varnishd/cache_vrt_esi.c @@ -643,7 +643,8 @@ VRT_ESI(struct sess *sp) 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, -- 2.39.5