]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
whops, was unfinished
authorTimo Sirainen <tss@iki.fi>
Wed, 28 Apr 2004 02:01:54 +0000 (05:01 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 28 Apr 2004 02:01:54 +0000 (05:01 +0300)
--HG--
branch : HEAD

src/lib-index/mail-index-lock.c

index 098dfa642deabcff998f4062cde05e192ff21a56..b829110bdb8bdcde2eb37dd59bab996716d1375a 100644 (file)
@@ -108,7 +108,9 @@ static int mail_index_lock(struct mail_index *index, int lock_type,
                   locks then, though */
                if (lock_type == F_WRLCK)
                        return 0;
-       } else {
+               if (mail_index_lock_mprotect(index, lock_type) < 0)
+                       return -1;
+               return 1;
        }
 
        if (lock_type == F_WRLCK && index->lock_type == F_RDLCK) {