istream-tee.c revision 5e7c5e406d0b80b6dc336e46e47a846e5c2b6507
/* Copyright (C) 2006 Timo Sirainen */
#include "lib.h"
#include "istream-internal.h"
#include "istream-tee.h"
struct tee_istream {
struct tee_child_istream *children;
};
struct tee_child_istream {
struct tee_istream *tee;
struct tee_child_istream *next;
};
{
const unsigned char *data;
}
}
{
}
if (min_skip > 0) {
}
}
{
}
{
struct tee_child_istream **p;
if (*p == tstream) {
break;
}
}
}
}
{
}
{
const unsigned char *data;
if (ret <= 0) {
/* someone else is holding the data,
wait for it */
return 0;
}
return ret;
}
}
return ret;
}
static void __attr_noreturn__
{
i_panic("tee-istream: seeking unsupported currently");
}
{
}
{
if (size != 0) {
i_panic("tee-istream: i_stream_sync() called "
"with data still buffered");
}
}
{
struct tee_istream *tee;
return tee;
}
struct istream *
{
struct tee_child_istream *tstream;
}