[master] 1f1448d Various nitpicking
Poul-Henning Kamp
phk at FreeBSD.org
Thu Nov 26 09:40:52 CET 2015
commit 1f1448dab047d6738af9528ccb2ca8365606527f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Nov 26 08:13:41 2015 +0000
Various nitpicking
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index b084680..5d1d1ab 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -997,6 +997,7 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
if (mode != VBF_BACKGROUND)
HSH_Ref(oc);
+ AZ(bo->fetch_objcore);
bo->fetch_objcore = oc;
AZ(bo->stale_oc);
diff --git a/bin/varnishd/cache/cache_obj.c b/bin/varnishd/cache/cache_obj.c
index 02d5fdc..54dd26f 100644
--- a/bin/varnishd/cache/cache_obj.c
+++ b/bin/varnishd/cache/cache_obj.c
@@ -116,8 +116,7 @@ ObjIterBegin(struct worker *wrk, struct objcore *oc)
oi->oc = oc;
oi->obj = obj;
oi->wrk = wrk;
- if (oc->objhead != NULL)
- oi->bo = HSH_RefBusy(oc);
+ oi->bo = HSH_RefBusy(oc);
return (oi);
}
diff --git a/bin/varnishd/cache/cache_req_body.c b/bin/varnishd/cache/cache_req_body.c
index ccd7a6a..f50621e 100644
--- a/bin/varnishd/cache/cache_req_body.c
+++ b/bin/varnishd/cache/cache_req_body.c
@@ -268,6 +268,12 @@ VRB_Cache(struct req *req, ssize_t maxsize)
} while (vfps == VFP_OK);
VFP_Close(vfc);
+ ObjTrimStore(req->wrk, req->body_oc);
+
+ /* XXX: check missing:
+ if (req->htc->content_length >= 0)
+ MUSTBE (req->req_bodybytes == req->htc->content_length);
+ */
if (vfps == VFP_END) {
assert(req->req_bodybytes >= 0);
diff --git a/bin/varnishd/mgt/mgt_acceptor.c b/bin/varnishd/mgt/mgt_acceptor.c
index 8edfd1c..3cf1bbc 100644
--- a/bin/varnishd/mgt/mgt_acceptor.c
+++ b/bin/varnishd/mgt/mgt_acceptor.c
@@ -129,11 +129,9 @@ mac_callback(void *priv, const struct suckaddr *sa)
CAST_OBJ_NOTNULL(mh, priv, MAC_HELP_MAGIC);
VTAILQ_FOREACH(ls, &heritage.socks, list) {
- if (!VSA_Compare(sa, ls->addr)) {
+ if (!VSA_Compare(sa, ls->addr))
ARGV_ERR("-a arguments %s and %s have same address\n",
ls->name, mh->name);
- return (-1);
- }
}
ALLOC_OBJ(ls, LISTEN_SOCK_MAGIC);
AN(ls);
More information about the varnish-commit
mailing list