From f3491a67a8beb979a73be8c90db8743be6c141ad Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 12 Jul 2006 14:13:50 +0000 Subject: [PATCH] Make Pass possible from vcl_hit() git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@458 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_center.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) 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(); } -- 2.39.5