istream-failure-at.c revision 2974dca6be5120e49279f06c8aa952e5fac56048
/* Copyright (c) 2015-2017 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream-private.h"
#include "istream-failure-at.h"
struct failure_at_istream {
struct istream_private istream;
char *error_string;
};
{
struct failure_at_istream *fstream =
(struct failure_at_istream *)stream;
}
static ssize_t
{
/* we already passed the wanted failure offset,
return error immediately. */
ret = -1;
} else {
/* return data up to the wanted failure offset and
on the next read() call return failure */
}
/* failure at EOF */
}
return ret;
}
struct istream *
const char *error_string)
{
struct failure_at_istream *fstream;
i_stream_get_fd(input), 0);
}
struct istream *
{
}