]> err.no Git - varnish/commitdiff
Initialize all directions to "opposite" for -b and -c to avoid
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 4 Aug 2006 20:03:36 +0000 (20:03 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 4 Aug 2006 20:03:36 +0000 (20:03 +0000)
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

index f162718d2fa62108a6f00b89793eccbee876c531..e51fa5d3ae5c434e20a4274685e2f1a7ae9e6821 100644 (file)
@@ -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;