r643 - trunk/varnish-cache/lib/libvarnishapi

phk at projects.linpro.no phk at projects.linpro.no
Fri Aug 4 22:03:36 CEST 2006


Author: phk
Date: 2006-08-04 22:03:36 +0200 (Fri, 04 Aug 2006)
New Revision: 643

Modified:
   trunk/varnish-cache/lib/libvarnishapi/shmlog.c
Log:
Initialize all directions to "opposite" for -b and -c to avoid
spurious first entries.



Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/shmlog.c	2006-08-04 19:42:37 UTC (rev 642)
+++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c	2006-08-04 20:03:36 UTC (rev 643)
@@ -122,6 +122,12 @@
 	vd->logend = vd->logstart + vsl_lh->size;
 	vd->ptr = vd->logstart;
 
+	if (vd->b_opt)
+		memset(vd->dir, 1, sizeof vd->dir);
+
+	if (vd->c_opt)
+		memset(vd->dir, 2, sizeof vd->dir);
+
 	if (!vd->d_opt)
 		while (vsl_nextlog(vd, &p) == 1)
 			continue;




More information about the varnish-commit mailing list