[master] 6d6979f Set the client/backend bit when synthesizing log records
Martin Blix Grydeland
martin at varnish-cache.org
Thu Oct 3 14:00:41 CEST 2013
commit 6d6979f0e224a0338392d8fa8bdc1b7cb97629be
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Wed Oct 2 21:48:54 2013 +0200
Set the client/backend bit when synthesizing log records
diff --git a/lib/libvarnishapi/vsl_dispatch.c b/lib/libvarnishapi/vsl_dispatch.c
index 1544604..055eefe 100644
--- a/lib/libvarnishapi/vsl_dispatch.c
+++ b/lib/libvarnishapi/vsl_dispatch.c
@@ -803,6 +803,17 @@ vtx_diag(struct vtx *vtx, const char *fmt, ...)
l = buflen - 1;
buf[l++] = '\0'; /* NUL-terminated */
diag->chunk[1] = vtx->key.vxid;
+ switch (vtx->type) {
+ case VSL_t_req:
+ case VSL_t_esireq:
+ diag->chunk[1] |= VSL_CLIENTMARKER;
+ break;
+ case VSL_t_bereq:
+ diag->chunk[1] |= VSL_BACKENDMARKER;
+ break;
+ default:
+ break;
+ }
diag->chunk[0] = ((((unsigned)SLT_VSL & 0xff) << 24) | l);
VTAILQ_INSERT_TAIL(&vtx->diag, diag, list);
More information about the varnish-commit
mailing list