dovecot-2.2: lib-storage: Avoid assert-crashing when updating ma...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Oct 29 14:17:51 EET 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/b5a5f5139148
changeset: 15267:b5a5f5139148
user: Timo Sirainen <tss at iki.fi>
date: Mon Oct 29 14:17:40 2012 +0200
description:
lib-storage: Avoid assert-crashing when updating mailbox list index.
diffstat:
src/lib-storage/list/mailbox-list-index-status.c | 5 +++++
src/lib-storage/list/mailbox-list-index.h | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diffs (34 lines):
diff -r 99965e11d9e1 -r b5a5f5139148 src/lib-storage/list/mailbox-list-index-status.c
--- a/src/lib-storage/list/mailbox-list-index-status.c Mon Oct 29 13:23:30 2012 +0200
+++ b/src/lib-storage/list/mailbox-list-index-status.c Mon Oct 29 14:17:40 2012 +0200
@@ -297,6 +297,9 @@
struct mailbox_status status;
uint32_t seq, seq1, seq2;
+ if (ilist->syncing || ilist->updating_status)
+ return;
+
(void)mailbox_list_index_refresh(box->list);
node = mailbox_list_index_lookup(box->list, box->name);
@@ -331,7 +334,9 @@
status.highest_modseq = 1;
}
+ ilist->updating_status = TRUE;
(void)index_list_update(box, list_view, seq, &status);
+ ilist->updating_status = FALSE;
}
mail_index_view_close(&list_view);
}
diff -r 99965e11d9e1 -r b5a5f5139148 src/lib-storage/list/mailbox-list-index.h
--- a/src/lib-storage/list/mailbox-list-index.h Mon Oct 29 13:23:30 2012 +0200
+++ b/src/lib-storage/list/mailbox-list-index.h Mon Oct 29 14:17:40 2012 +0200
@@ -108,6 +108,7 @@
unsigned int opened:1;
unsigned int syncing:1;
+ unsigned int updating_status:1;
unsigned int has_backing_store:1;
};
More information about the dovecot-cvs
mailing list