[dovecot-cvs] dovecot/src/lib-index mail-index-fsck.c,1.8,1.9
cras at procontrol.fi
cras at procontrol.fi
Mon Oct 28 06:36:46 EET 2002
Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv8047/lib-index
Modified Files:
mail-index-fsck.c
Log Message:
fsck() should reset lowwater marks to end of uids, not to beginning.
Index: mail-index-fsck.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-fsck.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- mail-index-fsck.c 9 Oct 2002 13:56:44 -0000 1.8
+++ mail-index-fsck.c 28 Oct 2002 04:36:43 -0000 1.9
@@ -27,16 +27,14 @@
CHECK(deleted_messages_count);
CHECK(last_nonrecent_uid);
- if (new_hdr->first_unseen_uid_lowwater != 0 &&
- old_hdr->first_unseen_uid_lowwater >
+ if (old_hdr->first_unseen_uid_lowwater >
new_hdr->first_unseen_uid_lowwater) {
i_warning("fsck: first_unseen_uid_lowwater %u > %u",
old_hdr->first_unseen_uid_lowwater,
new_hdr->first_unseen_uid_lowwater);
}
- if (new_hdr->first_deleted_uid_lowwater != 0 &&
- old_hdr->first_deleted_uid_lowwater >
+ if (old_hdr->first_deleted_uid_lowwater >
new_hdr->first_deleted_uid_lowwater) {
i_warning("fsck: first_deleted_uid_lowwater %u > %u",
old_hdr->first_deleted_uid_lowwater,
@@ -116,6 +114,11 @@
hdr->next_uid = max_uid+1;
if (hdr->last_nonrecent_uid >= hdr->next_uid)
hdr->last_nonrecent_uid = hdr->next_uid-1;
+
+ if (hdr->first_unseen_uid_lowwater == 0)
+ hdr->first_unseen_uid_lowwater = hdr->next_uid;
+ if (hdr->first_deleted_uid_lowwater == 0)
+ hdr->first_deleted_uid_lowwater = hdr->next_uid;
print_differences(&old_hdr, hdr);
More information about the dovecot-cvs
mailing list