]> err.no Git - varnish/commitdiff
Make Pass possible from vcl_hit()
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 12 Jul 2006 14:13:50 +0000 (14:13 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 12 Jul 2006 14:13:50 +0000 (14:13 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@458 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_center.c

index e79f667c19c96b31a10d6ea2a6212c909e9c67ca..dc1239ddf89eba476fe2df1da2ca6e05926e922b 100644 (file)
@@ -225,11 +225,23 @@ cnt_hit(struct worker *w, struct sess *sp)
 {
 
        VCL_hit_method(sp);
-
-       vca_write_obj(w, sp);
-       HSH_Deref(sp->obj);
-       sp->obj = NULL;
-       sp->step = STP_DONE;
+       if (sp->handling == VCL_RET_LOOKUP)
+               INCOMPL();
+       if (sp->handling == VCL_RET_PASS) {
+               PassSession(w, sp);
+               sp->step = STP_DONE;
+               return;
+       }
+       if (sp->handling == VCL_RET_ERROR)
+               INCOMPL();
+       if (sp->handling == VCL_RET_DELIVER) {
+               vca_write_obj(w, sp);
+               HSH_Deref(sp->obj);
+               sp->obj = NULL;
+               sp->step = STP_DONE;
+               return;
+       }
+       INCOMPL();
 }