Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/lib-storage/index/maildir/maildir-sync.c @ 7046:e74a1d1dca07 HEAD
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.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 28 Dec 2007 20:04:43 +0200 |
parents | 414c9d631a81 |
children | 048325df1ec4 |
comparison
equal
deleted
inserted
replaced
7045:ae0556fb268d | 7046:e74a1d1dca07 |
---|---|
228 maildir_sync_context, */ | 228 maildir_sync_context, */ |
229 return; | 229 return; |
230 } | 230 } |
231 | 231 |
232 now = time(NULL); | 232 now = time(NULL); |
233 if (now - ctx->last_touch > MAILDIR_LOCK_TOUCH_SECS) { | 233 if (now - ctx->last_touch > MAILDIR_LOCK_TOUCH_SECS && ctx->locked) { |
234 (void)maildir_uidlist_lock_touch(ctx->mbox->uidlist); | 234 (void)maildir_uidlist_lock_touch(ctx->mbox->uidlist); |
235 ctx->last_touch = now; | 235 ctx->last_touch = now; |
236 } | 236 } |
237 if (now - ctx->last_notify > MAIL_STORAGE_STAYALIVE_SECS) { | 237 if (now - ctx->last_notify > MAIL_STORAGE_STAYALIVE_SECS) { |
238 struct mailbox *box = &ctx->mbox->ibox.box; | 238 struct mailbox *box = &ctx->mbox->ibox.box; |