[dovecot-cvs] dovecot/src/lib file-dotlock.c,1.3,1.4

cras at procontrol.fi cras at procontrol.fi
Tue Apr 15 23:00:17 EEST 2003


Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv25846

Modified Files:
	file-dotlock.c 
Log Message:
Use different warning message for dotlock mtime change.



Index: file-dotlock.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/file-dotlock.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- file-dotlock.c	21 Mar 2003 06:47:06 -0000	1.3
+++ file-dotlock.c	15 Apr 2003 19:00:14 -0000	1.4
@@ -279,10 +279,15 @@
 	}
 
 	if (dotlock->ino != st.st_ino ||
-	    !CMP_DEV_T(dotlock->dev, st.st_dev) ||
-	    dotlock->mtime != st.st_mtime) {
+	    !CMP_DEV_T(dotlock->dev, st.st_dev)) {
 		i_warning("Our dotlock file %s was overridden", lock_path);
 		return 0;
+	}
+
+	if (dotlock->mtime != st.st_mtime) {
+		i_warning("Our dotlock file %s was modified (%s vs %s), "
+			  "assuming it wasn't overridden", lock_path,
+			  dec2str(dotlock->mtime), dec2str(st.st_mtime));
 	}
 
 	if (unlink(lock_path) < 0) {




More information about the dovecot-cvs mailing list