]> err.no Git - varnish/commitdiff
Move the fiddling of banned objects to cache_ban.c
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 19 Jan 2009 09:36:07 +0000 (09:36 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 19 Jan 2009 09:36:07 +0000 (09:36 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3524 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

index 64ea9a383754236ac122ee7f42bb99f63e1131dc..56b8000e5d0089ea11cdc3ae875d4841c9afa3c9 100644 (file)
@@ -518,6 +518,9 @@ BAN_CheckObject(struct object *o, const struct sess *sp)
                o->ban = b0;
                return (0);
        } else {
+               o->ttl = 0;
+               WSP(sp, SLT_ExpBan, "%u was banned", o->xid);
+               EXP_Rearm(o);
                o->ban = NULL;
                return (1);
        }
index 20760bc05d7c0f693cf952f4fdbf6d3c5edbfb2e..9db6d8131b0b31ac0f3766c34e243223c7374832 100644 (file)
@@ -255,12 +255,8 @@ HSH_Lookup(struct sess *sp)
                        continue;
                if (o->ttl == 0)
                        continue;
-               if (BAN_CheckObject(o, sp)) {
-                       o->ttl = 0;
-                       WSP(sp, SLT_ExpBan, "%u was banned", o->xid);
-                       EXP_Rearm(o);
+               if (BAN_CheckObject(o, sp)) 
                        continue;
-               }
                if (o->vary != NULL && !VRY_Match(sp, o->vary))
                        continue;