]> err.no Git - varnish/commitdiff
I accidentally committed the wrong patch in r1787; this corrects the logic
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 30 Jul 2007 14:31:16 +0000 (14:31 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 30 Jul 2007 14:31:16 +0000 (14:31 +0000)
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

index 3ffe096c6bc784d9aee121104e0fa44f5a6062b4..f324c7afe6e9b2873e3393bbb10aaccefd731c7a 100644 (file)
@@ -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;