From: phk Date: Wed, 2 Aug 2006 17:27:33 +0000 (+0000) Subject: More asserts, sp->vbc this time. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de5bfa132071c7f7e3a3a27ac207f5ce8e9315e7;p=varnish More asserts, sp->vbc this time. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@606 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index 6690afa4..05876c1c 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -84,6 +84,7 @@ cnt_done(struct sess *sp) { assert(sp->obj == NULL); + assert(sp->vbc == NULL); if (sp->fd >= 0 && sp->doclose != NULL) vca_close_session(sp, sp->doclose); VCL_Rel(sp->vcl); @@ -163,6 +164,7 @@ static int cnt_fetch(struct sess *sp) { + assert(sp->vbc != NULL); RFC2616_cache_policy(sp, sp->vbc->http); VCL_fetch_method(sp); @@ -188,7 +190,9 @@ cnt_fetch(struct sess *sp) } if (sp->handling == VCL_RET_INSERT) { sp->obj->cacheable = 1; + assert(sp->vbc != NULL); FetchBody(sp); + assert(sp->vbc == NULL); HSH_Ref(sp->obj); /* get another, STP_DELIVER will deref */ HSH_Unbusy(sp->obj); sp->wrk->acct.fetch++; @@ -400,8 +404,10 @@ cnt_miss(struct sess *sp) if (sp->handling == VCL_RET_LOOKUP) INCOMPL(); if (sp->handling == VCL_RET_FETCH) { + assert(sp->vbc == NULL); FetchHeaders(sp); sp->step = STP_FETCH; + assert(sp->vbc != NULL); return (0); } INCOMPL(); @@ -426,7 +432,9 @@ static int cnt_pass(struct sess *sp) { + assert(sp->vbc == NULL); PassSession(sp); + assert(sp->vbc != NULL); sp->step = STP_PASSBODY; return (0); } @@ -451,7 +459,9 @@ cnt_passbody(struct sess *sp) { sp->wrk->acct.pass++; + assert(sp->vbc != NULL); PassBody(sp); + assert(sp->vbc == NULL); sp->step = STP_DONE; return (0); } @@ -518,6 +528,7 @@ cnt_recv(struct sess *sp) sp->vcl = VCL_Get(); assert(sp->obj == NULL); + assert(sp->vbc == NULL); sp->wrk->acct.req++; done = http_DissectRequest(sp->http, sp->fd);