istream-tee.c revision a94936bafd127680184da114c6a177b37ff656e5
/* 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 istream_private 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 {
}
}
static void
{
}
{
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");
}
static const struct stat *
{
}
{
if (size != 0) {
i_panic("tee-istream: i_stream_sync() called "
"with data still buffered");
}
}
{
struct tee_istream *tee;
return tee;
}
{
struct tee_child_istream *tstream;
}