[dovecot-cvs] dovecot/src/lib-index mail-cache.c,1.15,1.16
cras at procontrol.fi
cras at procontrol.fi
Mon Oct 20 09:01:59 EEST 2003
Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv18881/lib-index
Modified Files:
mail-cache.c
Log Message:
Added dotlock parameter to specify how old lock file has to be to be
immediately deleted. This fixes the problem of never deleting uidlist.lock
files.
Index: mail-cache.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-cache.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- mail-cache.c 20 Oct 2003 03:13:06 -0000 1.15
+++ mail-cache.c 20 Oct 2003 05:01:57 -0000 1.16
@@ -35,7 +35,8 @@
#define MAIL_CACHE_GROW_PERCENTAGE 10
#define MAIL_CACHE_LOCK_TIMEOUT 120
-#define MAIL_CACHE_LOCK_STALE_TIMEOUT 60
+#define MAIL_CACHE_LOCK_CHANGE_TIMEOUT 60
+#define MAIL_CACHE_LOCK_IMMEDIATE_TIMEOUT (5*60)
#define CACHE_RECORD(cache, offset) \
((struct mail_cache_record *) ((char *) (cache)->mmap_base + offset))
@@ -452,7 +453,8 @@
/* maybe a rebuild.. */
fd = file_dotlock_open(cache->filepath, NULL, MAIL_CACHE_LOCK_TIMEOUT,
- MAIL_CACHE_LOCK_STALE_TIMEOUT, NULL, NULL);
+ MAIL_CACHE_LOCK_CHANGE_TIMEOUT,
+ MAIL_CACHE_LOCK_IMMEDIATE_TIMEOUT, NULL, NULL);
if (fd == -1) {
mail_cache_set_syscall_error(cache, "file_dotlock_open()");
return FALSE;
@@ -753,7 +755,8 @@
#endif
fd = file_dotlock_open(cache->filepath, NULL, MAIL_CACHE_LOCK_TIMEOUT,
- MAIL_CACHE_LOCK_STALE_TIMEOUT, NULL, NULL);
+ MAIL_CACHE_LOCK_CHANGE_TIMEOUT,
+ MAIL_CACHE_LOCK_IMMEDIATE_TIMEOUT, NULL, NULL);
if (fd == -1) {
mail_cache_set_syscall_error(cache, "file_dotlock_open()");
return FALSE;
@@ -814,7 +817,8 @@
return ret > 0;
fd = file_dotlock_open(cache->filepath, NULL, MAIL_CACHE_LOCK_TIMEOUT,
- MAIL_CACHE_LOCK_STALE_TIMEOUT, NULL, NULL);
+ MAIL_CACHE_LOCK_CHANGE_TIMEOUT,
+ MAIL_CACHE_LOCK_IMMEDIATE_TIMEOUT, NULL, NULL);
if (fd == -1) {
mail_cache_set_syscall_error(cache, "file_dotlock_open()");
return FALSE;
More information about the dovecot-cvs
mailing list