dovecot-2.0: Avoid assert-crashing when two processes try to cre...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 30 18:08:48 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/7aea0156986a
changeset: 9950:7aea0156986a
user: Timo Sirainen <tss at iki.fi>
date: Wed Sep 30 11:08:18 2009 -0400
description:
Avoid assert-crashing when two processes try to create index at the same time.
diffstat:
1 file changed, 5 insertions(+)
src/lib-index/mail-index.c | 5 +++++
diffs (15 lines):
diff -r ab80ebdc6557 -r 7aea0156986a src/lib-index/mail-index.c
--- a/src/lib-index/mail-index.c Wed Sep 30 10:45:02 2009 -0400
+++ b/src/lib-index/mail-index.c Wed Sep 30 11:08:18 2009 -0400
@@ -443,6 +443,11 @@ static int mail_index_open_files(struct
}
ret = mail_transaction_log_create(index->log, FALSE);
+ if (index->map != NULL) {
+ /* log creation could have changed it if someone else
+ just created it. */
+ index->map->hdr.indexid = index->indexid;
+ }
index->initial_create = FALSE;
created = TRUE;
}
More information about the dovecot-cvs
mailing list