From: des Date: Mon, 30 Jul 2007 14:31:16 +0000 (+0000) Subject: I accidentally committed the wrong patch in r1787; this corrects the logic X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58e780d8ee843096bfc47cccf883776360696310;p=varnish 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 --- 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;