]> err.no Git - varnish/commitdiff
Avoid an assertion failure by not calling EXP_TTLChange() for objects which
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 25 Jun 2007 16:24:18 +0000 (16:24 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 25 Jun 2007 16:24:18 +0000 (16:24 +0000)
are not on the expiry heap.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1568 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_hash.c

index da93ad08ac501164e0aa42e8f2a21515e8511a64..a48fb1ba35f712e286427b7303bc1f60724f7382 100644 (file)
@@ -157,7 +157,8 @@ VSLR(SLT_Debug, sp->fd, sp->hash_b, sp->hash_e);
                } else if (BAN_CheckObject(o, h->hd[HTTP_HDR_URL].b)) {
                        o->ttl = 0;
                        VSL(SLT_ExpBan, 0, "%u was banned", o->xid);
-                       EXP_TTLchange(o);
+                       if (o->heap_idx != 0)
+                               EXP_TTLchange(o);
                } else if (o->vary == NULL || VRY_Match(sp, o->vary))
                        break;
                o->refcnt--;