Mailing List Archive

r819 - trunk/varnish-cache/lib/libvarnishapi
Author: phk
Date: 2006-08-11 22:34:20 +0200 (Fri, 11 Aug 2006)
New Revision: 819

Modified:
trunk/varnish-cache/lib/libvarnishapi/shmlog.c
Log:
Make lack of -d option work as expected.


Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-08-11 20:28:45 UTC (rev 818)
+++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-08-11 20:34:20 UTC (rev 819)
@@ -155,9 +155,11 @@
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);
}