From 05219678c2a097600350fb91add3b684de2ae82d Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 11 Aug 2006 20:34:20 +0000 Subject: [PATCH] Make lack of -d option work as expected. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@819 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/lib/libvarnishapi/shmlog.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/varnish-cache/lib/libvarnishapi/shmlog.c b/varnish-cache/lib/libvarnishapi/shmlog.c index b76ab633..5aead126 100644 --- a/varnish-cache/lib/libvarnishapi/shmlog.c +++ b/varnish-cache/lib/libvarnishapi/shmlog.c @@ -155,9 +155,11 @@ VSL_OpenLog(struct VSL_data *vd) vd->logend = vd->logstart + vsl_lh->size; vd->ptr = vd->logstart; - if (!vd->d_opt) - while (vsl_nextlog(vd, &p) == 1) - continue; + if (!vd->d_opt && vd->fi == NULL) { + for (p = vd->ptr; *p != SLT_ENDMARKER; ) + p += p[1] + 5; + vd->ptr = p; + } return (0); } -- 2.39.5