[4.0] ab54a9e Don't log SLT_ReqAcct when we don't have assigned a VXID yet.
Lasse Karstensen
lkarsten at varnish-software.com
Mon Sep 22 16:38:25 CEST 2014
commit ab54a9e571b5368b7a050ae4602c3805f42d5e38
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Mon Sep 1 14:22:34 2014 +0200
Don't log SLT_ReqAcct when we don't have assigned a VXID yet.
This prevents SLT_ReqAcct log records with 0 as VXID.
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index d57de9a..73a36c0 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -956,7 +956,7 @@ CNT_AcctLogCharge(struct dstat *ds, struct req *req)
a = &req->acct;
- if (!(req->res_mode & RES_PIPE)) {
+ if (req->vsl->wid && !(req->res_mode & RES_PIPE)) {
VSLb(req->vsl, SLT_ReqAcct, "%ju %ju %ju %ju %ju %ju",
(uintmax_t)a->req_hdrbytes,
(uintmax_t)a->req_bodybytes,
More information about the varnish-commit
mailing list