istream-chain.c revision a10ed8c47534b4c6b6bf2711ccfe577e720a47b4
/* Copyright (c) 2003-2012 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "llist.h"
#include "istream-private.h"
#include "istream-chain.h"
struct chain_istream;
struct istream_chain_link {
};
struct istream_chain {
struct chain_istream *stream;
};
struct chain_istream {
struct istream_private istream;
struct istream_chain chain;
};
static void ATTR_NULL(2)
{
struct istream_chain_link *link;
return;
}
} else {
}
}
}
{
}
{
}
static void
{
}
}
{
}
}
{
struct istream *prev_input;
const unsigned char *data;
/* we already verified that the data size is less than the
maximum buffer size */
if (data_size > 0) {
i_unreached();
}
}
{
const unsigned char *data;
bool last_stream;
return -1;
}
if (cstream->prev_stream_left == 0) {
/* no need to worry about buffers, skip everything */
/* we're still skipping inside buffer */
bytes_skipped = 0;
} else {
/* done with the buffer */
cstream->prev_stream_left = 0;
}
i_assert(bytes_skipped == 0);
return 0;
}
ret = 0;
else {
/* need to read more */
return ret;
}
return -1;
}
/* we either read something or we're at EOF */
return -2;
return i_stream_chain_read(stream);
}
}
if (cstream->prev_stream_left == 0) {
} else {
return -2;
}
(ret == 0 ? 0 : -1);
return ret;
}
static const struct stat *
bool exact ATTR_UNUSED)
{
i_panic("istream_chain(): stat() not supported");
return NULL;
}
static int
{
i_panic("istream_chain(): get_size() not supported");
return -1;
}
{
struct chain_istream *cstream;
}