From: phk Date: Wed, 12 Jul 2006 14:13:50 +0000 (+0000) Subject: Make Pass possible from vcl_hit() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3491a67a8beb979a73be8c90db8743be6c141ad;p=varnish Make Pass possible from vcl_hit() git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@458 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index e79f667c..dc1239dd 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -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(); }