[dovecot-cvs] dovecot/src/lib file-dotlock.c,1.37,1.38
cras at dovecot.org
cras at dovecot.org
Thu Jun 8 19:42:42 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv6871
Modified Files:
file-dotlock.c
Log Message:
If dotlock creation timeouts, unlink() the temp file we used
Index: file-dotlock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/file-dotlock.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- file-dotlock.c 8 Jun 2006 16:41:30 -0000 1.37
+++ file-dotlock.c 8 Jun 2006 16:42:40 -0000 1.38
@@ -324,7 +324,7 @@
return -1;
}
- if (unlink(lock_info->temp_path) < 0 && errno != ENOENT) {
+ if (unlink(lock_info->temp_path) < 0) {
i_error("unlink(%s) failed: %m", lock_info->temp_path);
/* non-fatal, continue */
}
@@ -459,6 +459,10 @@
i_error("close(%s) failed: %m", lock_path);
errno = old_errno;
}
+ if (lock_info.temp_path != NULL) {
+ if (unlink(lock_info.temp_path) < 0)
+ i_error("unlink(%s) failed: %m", lock_info.temp_path);
+ }
if (ret == 0)
errno = EAGAIN;
More information about the dovecot-cvs
mailing list