istream.c revision 7a77b948806106b46a33f3e6a3869657f49877fd
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainenvoid i_stream_set_name(struct istream *stream, const char *name)
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen stream->real_stream->iostream.name = i_strdup(name);
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainenconst char *i_stream_get_name(struct istream *stream)
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen while (stream->real_stream->iostream.name == NULL) {
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainenstatic void i_stream_close_full(struct istream *stream, bool close_parents)
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen io_stream_close(&stream->real_stream->iostream, close_parents);
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen io_stream_ref(&stream->real_stream->iostream);
96f2533c48ce5def0004931606a2fdf275578880Timo Sirainen struct istream_private *_stream = (*stream)->real_stream;
96f2533c48ce5def0004931606a2fdf275578880Timo Sirainen io_stream_unref(&(*stream)->real_stream->iostream);
96f2533c48ce5def0004931606a2fdf275578880Timo Sirainenvoid i_stream_add_destroy_callback(struct istream *stream,
96f2533c48ce5def0004931606a2fdf275578880Timo Sirainen struct iostream_private *iostream = &stream->real_stream->iostream;
void (*callback)())
unsigned int i, count;
for (i = 0; i < count; i++) {
i_unreached();
struct istream *s;
if (s->stream_errno == 0)
switch (ret) {
return ret;
ret = 0;
return ret;
return TRUE;
return FALSE;
char *ret;
end = i;
return ret;
return NULL;
const unsigned char *pos;
return NULL;
char *line;
return NULL;
return NULL;
return line;
return FALSE;
return FALSE;
return TRUE;
*size_r = 0;
return NULL;
*size_r = 0;
return NULL;
return size;
*size_r = 0;
return NULL;
if (ret > 0)
} while (ret > 0);
if (ret == 0) {
if (read_more) {
return *size_r > 0;
return FALSE;
return TRUE;
if (!pending)
bool close_parent)
if (available == 0) {
struct istream *
struct istream *
return input;