dovecot: Don't treat uid_validity=0 && next_uid!=1 as a corrupte...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 2 03:07:27 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/c76101b824ec
changeset: 6343:c76101b824ec
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 02 03:05:38 2007 +0300
description:
Don't treat uid_validity=0 && next_uid!=1 as a corrupted index. fsck fixes
it.
diffstat:
1 file changed, 2 insertions(+), 7 deletions(-)
src/lib-index/mail-index-map.c | 9 ++-------
diffs (26 lines):
diff -r 702f13f44c5e -r c76101b824ec src/lib-index/mail-index-map.c
--- a/src/lib-index/mail-index-map.c Sun Sep 02 03:04:47 2007 +0300
+++ b/src/lib-index/mail-index-map.c Sun Sep 02 03:05:38 2007 +0300
@@ -272,13 +272,6 @@ int mail_index_map_check_header(struct m
return -1;
/* following some extra checks that only take a bit of CPU */
- if (hdr->uid_validity == 0 && hdr->next_uid != 1) {
- mail_index_set_error(index, "Corrupted index file %s: "
- "uid_validity = 0, next_uid = %u",
- index->filepath, hdr->next_uid);
- return -1;
- }
-
if (hdr->record_size < sizeof(struct mail_index_record)) {
mail_index_set_error(index, "Corrupted index file %s: "
"record_size too small: %u < %"PRIuSIZE_T,
@@ -290,6 +283,8 @@ int mail_index_map_check_header(struct m
if ((hdr->flags & MAIL_INDEX_HDR_FLAG_FSCK) != 0)
return 0;
+ if (hdr->uid_validity == 0 && hdr->next_uid != 1)
+ return 0;
if (hdr->next_uid == 0)
return 0;
More information about the dovecot-cvs
mailing list