[master] ca6a58d Don't discard the initial bit of the VSL

Poul-Henning Kamp phk at FreeBSD.org
Mon Aug 25 10:20:40 CEST 2014


commit ca6a58d22b292917177b46615afebfb0f224cff4
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 25 08:19:50 2014 +0000

    Don't discard the initial bit of the VSL

diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index 469effd..00c96c6 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -184,7 +184,7 @@ varnishlog_thread(void *priv)
 	uint32_t vxid;
 	unsigned len;
 	const char *tagname, *data;
-	int type, i;
+	int type, i, opt;
 
 	CAST_OBJ_NOTNULL(v, priv, VARNISH_MAGIC);
 
@@ -195,6 +195,7 @@ varnishlog_thread(void *priv)
 	(void)VSM_n_Arg(vsm, v->workdir);
 
 	c = NULL;
+	opt = 0;
 	while (v->pid) {
 		if (c == NULL) {
 			VTIM_sleep(0.1);
@@ -202,7 +203,7 @@ varnishlog_thread(void *priv)
 				VSM_ResetError(vsm);
 				continue;
 			}
-			c = VSL_CursorVSM(vsl, vsm, 1);
+			c = VSL_CursorVSM(vsl, vsm, opt);
 			if (c == NULL) {
 				VSL_ResetError(vsl);
 				continue;
@@ -210,6 +211,8 @@ varnishlog_thread(void *priv)
 		}
 		AN(c);
 
+		opt = VSL_COPT_TAIL;
+
 		i = VSL_Next(c);
 		if (i == 0) {
 			/* Nothing to do but wait */



More information about the varnish-commit mailing list