[4.1] 62163f4b6 Simplify cnt_lookup
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Thu Sep 13 13:03:12 UTC 2018
commit 62163f4b696683cc06c001532bd0641d2cfffbce
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Tue Jun 19 15:43:25 2018 +0200
Simplify cnt_lookup
This is a back port of 4a370dc4f91706b19c2e3d3103c4f13957349bbc
Conflicts:
bin/varnishd/cache/cache_req_fsm.c
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index a8dcfe0ad..1aa432dfd 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -400,12 +400,17 @@ cnt_lookup(struct worker *wrk, struct req *req)
AZ(req->objcore);
if (lr == HSH_MISS) {
- /* Found nothing or an object that was out of grace */
- AN(boc);
- AN(boc->flags & OC_F_BUSY);
- req->objcore = boc;
- req->stale_oc = oc;
- req->req_step = R_STP_MISS;
+ if (boc != NULL) {
+ /* out-of-grace or ordinary miss */
+ AN(boc->flags & OC_F_BUSY);
+ req->objcore = boc;
+ req->stale_oc = oc;
+ req->req_step = R_STP_MISS;
+ } else {
+ /* hitpass */
+ AZ(oc);
+ req->req_step = R_STP_PASS;
+ }
return (REQ_FSM_MORE);
}
More information about the varnish-commit
mailing list