[dovecot-cvs] dovecot/src/lib file-dotlock.c,1.35.2.4,1.35.2.5

tss at dovecot.org tss at dovecot.org
Fri May 11 17:07:04 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv4843

Modified Files:
      Tag: branch_1_0
	file-dotlock.c 
Log Message:
Give a better error message if dotlock is deleted immediately under us (or
more likely an OS bug).



Index: file-dotlock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/file-dotlock.c,v
retrieving revision 1.35.2.4
retrieving revision 1.35.2.5
diff -u -d -r1.35.2.4 -r1.35.2.5
--- file-dotlock.c	17 Mar 2007 15:28:07 -0000	1.35.2.4
+++ file-dotlock.c	11 May 2007 14:07:01 -0000	1.35.2.5
@@ -521,7 +521,12 @@
 	/* some NFS implementations may have used cached mtime in previous
 	   fstat() call. Check again to avoid "dotlock was modified" errors. */
 	if (stat(lock_path, &st) < 0) {
-		i_error("stat(%s) failed: %m", lock_path);
+		if (errno != ENOENT)
+			i_error("stat(%s) failed: %m", lock_path);
+		else {
+			i_error("dotlock %s was immediately deleted under us",
+				lock_path);
+		}
                 file_dotlock_free(dotlock);
 		t_pop();
 		return -1;



More information about the dovecot-cvs mailing list