]> err.no Git - varnish/commitdiff
Allow for pass opbjects not having a objcore
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 16 Feb 2009 15:34:00 +0000 (15:34 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 16 Feb 2009 15:34:00 +0000 (15:34 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3774 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_hash.c
varnish-cache/bin/varnishd/cache_vrt_esi.c

index 8049a2d11282036c749f4d3852ca430572cfa1d7..f5efca2658c079bc29418b08d9f4a81a37a6c632 100644 (file)
@@ -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);
 }
 
index d92c628fdb03a558eb873f6e6e5a186327a4604f..74ebbd027b40f6fc5faa64e784e41cb85d865c72 100644 (file)
@@ -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,