mdbox-mail.c revision 9af6cc9ebc9986c1275ebdfa29c39e152af1557e
/* Copyright (c) 2007-2010 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "istream.h"
#include "str.h"
#include "index-mail.h"
#include "dbox-mail.h"
#include "mdbox-storage.h"
#include "mdbox-sync.h"
#include "mdbox-map.h"
#include "mdbox-file.h"
#include <stdlib.h>
{
const struct mdbox_mail_index_record *dbox_rec;
struct mdbox_index_header hdr;
const void *data;
bool expunged;
"mdbox %s: map uid lost for uid %u",
return -1;
}
if (mbox->map_uid_validity == 0) {
return -1;
}
}
return -1;
"mdbox %s: map uidvalidity mismatch (%u vs %u)",
return -1;
}
return 0;
}
{
return;
}
"Unexpectedly lost %s uid=%u map_uid=%u",
}
{
struct mdbox_mailbox *mbox =
int ret;
if (ret < 0)
return -1;
/* map_uid doesn't exist anymore. either it
got just expunged or the map index is
corrupted. */
return -1;
} else {
}
return 0;
}
{
bool deleted;
return -1;
}
do {
/* already open */
return -1;
return -1;
} else {
/* mail is being saved in this transaction */
}
return -1;
if (deleted) {
/* either it's expunged now or moved to another file. */
struct mdbox_file *mfile =
return -1;
}
return -1;
}
return 0;
}
{
struct mdbox_mailbox *mbox =
const struct mdbox_mail_index_record *dbox_rec;
const void *data;
bool expunged;
/* lost for some reason, use fallback */
}
return TRUE;
}
static void
enum mail_flags flags)
{
if ((flags & DBOX_INDEX_FLAG_ALT) != 0) {
flags &= ~DBOX_INDEX_FLAG_ALT;
return;
}
}
struct mail_vfuncs mdbox_mail_vfuncs = {
NULL,
};