[master] a1100ba Nail down the asserts where we want them.

Poul-Henning Kamp phk at varnish-cache.org
Fri May 24 14:41:17 CEST 2013


commit a1100baacff2efa81b75a9ef8e3e6b0725dc8e42
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri May 24 12:41:00 2013 +0000

    Nail down the asserts where we want them.

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 110723e..143a929 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -816,6 +816,10 @@ VBF_Fetch(struct worker *wrk, struct req *req)
 		i = vbf_fetch_hdr(wrk, bo, req);
 	}
 
+	if (bo->do_pass)
+		req = NULL;
+	AZ(req);
+
 	if (i) {
 		wrk->handling = VCL_RET_ERROR;
 		bo->err_code = 503;
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index a325742..1e55fcd 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -361,6 +361,7 @@ cnt_fetch(struct worker *wrk, struct req *req)
 	req->acct_req.fetch++;
 	i = VBF_Fetch(wrk, req);
 	AN(req->busyobj);
+	AZ(req->objcore);
 	assert(req->busyobj->refcount > 0);
 	(void)HTTP1_DiscardReqBody(req);
 	if (i < 0) {



More information about the varnish-commit mailing list