mail-index-fsck.c revision 92888ef30960c30ccc9e030fe7eab5d4d04a7d1c
/* Copyright (C) 2004 Timo Sirainen */
#include "lib.h"
#include "mail-index-private.h"
#include "mail-transaction-log.h"
const char *fmt, ...)
{
}
}
const char **error_r)
{
struct mail_index_header hdr;
/* locking already does the most important sanity checks for header */
*error_r = "uid_validity = 0 && next_uid != 1";
return 0;
}
hdr.messages_count = 0;
hdr.recent_messages_count = 0;
hdr.seen_messages_count = 0;
*error_r = "Record UIDs are not ordered";
return 0;
}
hdr.first_recent_uid_lowwater == 0)
hdr.first_unseen_uid_lowwater == 0)
}
}
if (hdr.first_recent_uid_lowwater == 0)
if (hdr.first_unseen_uid_lowwater == 0)
if (hdr.first_deleted_uid_lowwater == 0)
CHECK(messages_count, !=);
CHECK(recent_messages_count, !=);
CHECK(seen_messages_count, !=);
CHECK(deleted_messages_count, !=);
return -1;
return 1;
}
{
const char *error;
unsigned int lock_id;
int ret;
&file_offset) < 0)
return -1;
return -1;
}
if (ret >= 0)
}
if (ret == 0)
return ret;
}