mbox-file.c revision 8153fdec343e40e2a78f5c12353e89b994b28f74
/* Copyright (C) 2002-2003 Timo Sirainen */
#include "lib.h"
#include "istream.h"
#include "mbox-storage.h"
#include "mbox-sync-private.h"
#include "mbox-file.h"
#include "istream-raw-mbox.h"
{
int fd;
/* read-only mbox stream */
return 0;
}
}
if (fd == -1) {
return -1;
}
return -1;
}
return 0;
}
{
i_error("close(mbox) failed: %m");
}
}
{
return 0;
/* read-only mbox stream */
mbox->mbox_stream =
return 0;
}
if (mbox_file_open(mbox) < 0)
return -1;
}
if (mbox->mbox_writeonly) {
0, 0, FALSE);
} else {
}
mbox->mbox_stream =
return 0;
}
{
}
/* read-only mbox stream */
} else {
}
}
}
{
const void *data;
int ret;
if (ret <= 0) {
if (ret < 0)
else
return -1;
}
"Cached message offset lost for seq %u in mbox file %s",
return -1;
}
if (offset == 0) {
"Mailbox isn't a valid mbox file");
return -1;
}
if (mbox->mbox_sync_dirty)
return 0;
"Cached message offset %s is invalid for mbox file %s",
return -1;
}
if (mbox->mbox_sync_dirty) {
/* we're dirty - make sure this is the correct mail */
if (ret <= 0)
return ret;
}
return 1;
}