From 58e780d8ee843096bfc47cccf883776360696310 Mon Sep 17 00:00:00 2001 From: des Date: Mon, 30 Jul 2007 14:31:16 +0000 Subject: [PATCH] I accidentally committed the wrong patch in r1787; this corrects the logic used to determine which lock type (shared or exclusive) to use. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1790 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/lib/libvarnish/flopen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/varnish-cache/lib/libvarnish/flopen.c b/varnish-cache/lib/libvarnish/flopen.c index 3ffe096c..f324c7af 100644 --- a/varnish-cache/lib/libvarnish/flopen.c +++ b/varnish-cache/lib/libvarnish/flopen.c @@ -60,7 +60,7 @@ flopen(const char *path, int flags, ...) va_end(ap); } - lock.l_type = (flags & O_WRONLY || flags & O_RDWR) ? F_WRLCK : F_RDLCK; + lock.l_type = (flags & O_RDONLY) ? F_RDLCK : F_WRLCK; lock.l_start = 0; lock.l_whence = SEEK_SET; lock.l_len = 0; -- 2.39.5