[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-keywords.c, 1.11, 1.12 maildir-uidlist.c, 1.55, 1.56

tss at dovecot.org tss at dovecot.org
Thu Dec 28 16:51:21 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv1187/lib-storage/index/maildir

Modified Files:
	maildir-keywords.c maildir-uidlist.c 
Log Message:
More dotlock_use_excl uses.


Index: maildir-keywords.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-keywords.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- maildir-keywords.c	3 Dec 2006 14:35:07 -0000	1.11
+++ maildir-keywords.c	28 Dec 2006 16:51:16 -0000	1.12
@@ -20,6 +20,9 @@
 #include <sys/stat.h>
 #include <utime.h>
 
+/* how many seconds to wait before overriding dovecot-keywords.lock */
+#define KEYWORDS_LOCK_STALE_TIMEOUT (60*2)
+
 struct maildir_keywords {
 	struct maildir_mailbox *mbox;
 	char *path;
@@ -56,6 +59,13 @@
 	i_array_init(&mk->list, MAILDIR_MAX_KEYWORDS);
 	mk->hash = hash_create(default_pool, mk->pool, 0,
 			       strcase_hash, (hash_cmp_callback_t *)strcasecmp);
+
+	mk->dotlock_settings.use_excl_lock =
+		(STORAGE(mbox->storage)->flags &
+		 MAIL_STORAGE_FLAG_DOTLOCK_USE_EXCL) != 0;
+	mk->dotlock_settings.timeout = KEYWORDS_LOCK_STALE_TIMEOUT + 2;
+	mk->dotlock_settings.stale_timeout = KEYWORDS_LOCK_STALE_TIMEOUT;
+	mk->dotlock_settings.temp_prefix = mbox->storage->temp_prefix;
 	return mk;
 }
 

Index: maildir-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-uidlist.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- maildir-uidlist.c	22 Dec 2006 14:20:38 -0000	1.55
+++ maildir-uidlist.c	28 Dec 2006 16:51:17 -0000	1.56
@@ -172,6 +172,9 @@
 				     maildir_hash, maildir_cmp);
 	uidlist->next_uid = 1;
 
+	uidlist->dotlock_settings.use_excl_lock =
+		(STORAGE(mbox->storage)->flags &
+		 MAIL_STORAGE_FLAG_DOTLOCK_USE_EXCL) != 0;
 	uidlist->dotlock_settings.timeout = UIDLIST_LOCK_STALE_TIMEOUT + 2;
 	uidlist->dotlock_settings.stale_timeout = UIDLIST_LOCK_STALE_TIMEOUT;
 	uidlist->dotlock_settings.temp_prefix = mbox->storage->temp_prefix;



More information about the dovecot-cvs mailing list