From 74ab4971838289681e6d4f0231204c1ec9596e16 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 4 Aug 2006 20:03:36 +0000 Subject: [PATCH] Initialize all directions to "opposite" for -b and -c to avoid spurious first entries. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@643 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/lib/libvarnishapi/shmlog.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/varnish-cache/lib/libvarnishapi/shmlog.c b/varnish-cache/lib/libvarnishapi/shmlog.c index f162718d..e51fa5d3 100644 --- a/varnish-cache/lib/libvarnishapi/shmlog.c +++ b/varnish-cache/lib/libvarnishapi/shmlog.c @@ -122,6 +122,12 @@ VSL_OpenLog(struct VSL_data *vd) 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; -- 2.39.5