dovecot: When doing a forced sync, we're not necessarily locked....

dovecot at dovecot.org dovecot at dovecot.org
Fri Dec 28 20:04:51 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/e74a1d1dca07
changeset: 7046:e74a1d1dca07
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Dec 28 20:04:43 2007 +0200
description:
When doing a forced sync, we're not necessarily locked. If it takes a while,
don't try to touch dovecot-uidlist and assert-crash.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-storage/index/maildir/maildir-sync.c |    2 +-

diffs (12 lines):

diff -r ae0556fb268d -r e74a1d1dca07 src/lib-storage/index/maildir/maildir-sync.c
--- a/src/lib-storage/index/maildir/maildir-sync.c	Fri Dec 28 19:14:36 2007 +0200
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Fri Dec 28 20:04:43 2007 +0200
@@ -230,7 +230,7 @@ void maildir_sync_notify(struct maildir_
 	}
 
 	now = time(NULL);
-	if (now - ctx->last_touch > MAILDIR_LOCK_TOUCH_SECS) {
+	if (now - ctx->last_touch > MAILDIR_LOCK_TOUCH_SECS && ctx->locked) {
 		(void)maildir_uidlist_lock_touch(ctx->mbox->uidlist);
 		ctx->last_touch = now;
 	}


More information about the dovecot-cvs mailing list