changeset 1921:e28999e74a12 HEAD

whops, was unfinished
author Timo Sirainen <tss@iki.fi>
date Wed, 28 Apr 2004 05:01:54 +0300
parents d11efbf1d341
children e4c30cb5d094
files src/lib-index/mail-index-lock.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-lock.c	Wed Apr 28 05:00:39 2004 +0300
+++ b/src/lib-index/mail-index-lock.c	Wed Apr 28 05:01:54 2004 +0300
@@ -108,7 +108,9 @@
 		   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) {