/* Copyright (c) 2009-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "mail-storage-private.h"
#include "istream-private.h"
#include "index-mail.h"
#include "istream-mail.h"
struct mail_istream {
};
{
return TRUE;
/* make sure this call doesn't change any existing error message,
just in case there's already something important in it. */
}
static const char *
{
#if 0
/* FIXME: This function may get called in the middle of header parsing,
which then goes into parsing cached headers and causes crashes.
So disable this for now. Eventually it would be nice if recursion
was possible by each parser using its own private struct. */
static const char *headers[] = {
"Message-Id",
"Date",
"Subject"
};
unsigned int i;
for (i = 0; i < N_ELEMENTS(headers); i++) {
break;
}
}
return ret;
#else
return "";
#endif
}
static void
{
char chr;
/* input stream is larger than cached message size */
str = "smaller";
chr = '<';
} else {
/* input stream is smaller than cached message size */
str = "larger";
chr = '>';
}
if (mail_id[0] != '\0')
"Cached message size %s than expected "
t_strdup_printf("read(%s) failed: %s",
}
static ssize_t
{
if (ret > 0) {
if (!mstream->files_read_increased) {
}
return -1;
}
if (!mstream->input_has_body) {
/* trying to read past the header, but this stream
doesn't have the body */
return -1;
}
/* update mail's expunged-flag if needed */
}
return -1;
}
return -1;
}
}
return ret;
}
bool input_has_body)
{
i_stream_get_fd(input), 0);
}