mail-index-fsck.c revision 3697080532ccd9f51fac108be6079b616c7a2ddf
/* Copyright (C) 2004-2007 Timo Sirainen */
#include "lib.h"
#include "ioloop.h"
#include "mail-index-private.h"
#include "mail-transaction-log.h"
const char *fmt, ...)
{
}
}
static int
{
struct mail_index_header hdr;
const struct mail_index_record *rec;
if (*lock) {
&file_offset) < 0) {
return -1;
}
} else {
&file_offset);
}
/* Remember the log head position. If we go back in the index's head
offset, ignore errors in the log up to this offset. */
/* locking already does the most important sanity checks for header */
sizeof(struct mail_transaction_log_header);
} else {
}
hdr.messages_count = 0;
hdr.seen_messages_count = 0;
*error_r = "Record UIDs are not ordered";
return 0;
}
hdr.first_unseen_uid_lowwater == 0)
}
}
if (hdr.first_unseen_uid_lowwater == 0)
if (hdr.first_deleted_uid_lowwater == 0)
if (hdr.first_recent_uid == 0)
CHECK(log_file_seq, !=);
CHECK(log_file_head_offset, !=);
CHECK(log_file_tail_offset, !=);
CHECK(uid_validity, !=);
CHECK(messages_count, !=);
CHECK(seen_messages_count, !=);
CHECK(deleted_messages_count, !=);
CHECK(first_recent_uid, !=);
return 1;
}
{
struct mail_index_map *map;
int ret;
if (ret > 0) {
}
}
if (ret == 0)
if (lock)
return ret;
}