[master] 8888447 Make VSL_Open not open the shmlog if run with -r
Tollef Fog Heen
tfheen at varnish-cache.org
Mon Aug 1 14:06:21 CEST 2011
commit 88884473af98bc9a3d32f352726e974e3b995023
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date: Mon Aug 1 13:53:23 2011 +0200
Make VSL_Open not open the shmlog if run with -r
diff --git a/lib/libvarnishapi/vsl.c b/lib/libvarnishapi/vsl.c
index 4141c28..b06c4df 100644
--- a/lib/libvarnishapi/vsl.c
+++ b/lib/libvarnishapi/vsl.c
@@ -375,9 +375,11 @@ VSL_Open(struct VSM_data *vd, int diag)
vsl = vd->vsl;
CHECK_OBJ_NOTNULL(vsl, VSL_MAGIC);
- i = VSM_Open(vd, diag);
- if (i)
- return (i);
+ if (vsl->r_fd == -1) {
+ i = VSM_Open(vd, diag);
+ if (i)
+ return (i);
+ }
if (!vsl->d_opt && vsl->r_fd == -1) {
while (*vsl->log_ptr != VSL_ENDMARKER)
More information about the varnish-commit
mailing list