istream-tee.c revision 4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742
/* 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;
continue;
}
}
}
{
}
}
}
{
}
{
struct tee_child_istream **p;
if (*p == tstream) {
break;
}
}
} else {
}
}
{
}
{
const unsigned char *data;
if (ret <= 0) {
/* someone else is holding the data,
wait for it */
return 0;
}
return ret;
}
} else {
}
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;
}