[dovecot-cvs] dovecot/src/lib-index mail-index-lock.c,1.26,1.27
    cras at dovecot.org 
    cras at dovecot.org
       
    Fri Sep  3 22:55:37 EEST 2004
    
    
  
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv27825/lib-index
Modified Files:
	mail-index-lock.c 
Log Message:
mprotect() wasn't always called when index was being locked, and caused
crashes.
Index: mail-index-lock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-lock.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- mail-index-lock.c	25 Aug 2004 08:06:15 -0000	1.26
+++ mail-index-lock.c	3 Sep 2004 19:55:35 -0000	1.27
@@ -76,8 +76,11 @@
 	if (update_index && index->excl_lock_count == 0) {
 		if ((ret2 = mail_index_refresh(index)) < 0)
 			return -1;
-		if (ret > 0 && ret2 == 0)
+		if (ret > 0 && ret2 == 0) {
+			if (mail_index_lock_mprotect(index, lock_type) < 0)
+				return -1;
 			return 1;
+		}
 		ret = 0;
 	}
 
    
    
More information about the dovecot-cvs
mailing list