mail-index-util.c revision d14de73e30d5d0e06a5b28508b6a44e888edd2d1
/* Copyright (C) 2002 Timo Sirainen */
#include "lib.h"
#include "iobuffer.h"
#include "hostpid.h"
#include "message-size.h"
#include "message-part-serialize.h"
#include "mail-index.h"
#include "mail-index-util.h"
#include <unistd.h>
#include <fcntl.h>
{
else {
}
return FALSE;
}
{
t_push();
t_pop();
return FALSE;
}
{
return FALSE;
}
const char *function)
{
return FALSE;
}
{
}
}
{
int fd;
hostpid_init();
/* use ".temp.host.pid" as temporary file name. unlink() it first,
just to be sure it's not symlinked somewhere for some reason.. */
/* usage of O_EXCL isn't exactly needed since the path should be
trusted, but it shouldn't hurt either - if creating file fails
because of it, it's because something must be wrong (race
condition). also, might not won't work through NFS but that
can't be helped. */
if (fd == -1) {
}
return fd;
}
{
const void *part_data;
/* virtual size == physical size */
return TRUE;
}
/* get sizes from preparsed message structure */
/* corrupted, ignore */
"Corrupted cached MessagePart data");
} else {
return TRUE;
}
}
/* only way left is to actually parse the message */
*virtual_size = 0;
if (fastscan) {
/* and we don't want that */
return FALSE;
}
return FALSE;
so parse the whole message as a "body" */
return TRUE;
}