ostream.c revision 5a1b498b646b5c5dbd1b3f3861df766f560578c5
/* Copyright (c) 2002-2016 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "ostream-private.h"
{
}
{
return "";
}
}
{
}
{
struct ostream *s;
/* we'll only return errors for streams that have stream_errno set.
we might be returning unintended error otherwise. */
if (stream->stream_errno == 0)
return "<no error>";
if (s->stream_errno == 0)
break;
}
}
{
/* first mark the stream as being closed so the
o_stream_copy_error_from_parent() won't recurse us back
here. but don't immediately mark the stream closed, because
we may still want to write something to it. */
}
if (stream->stream_errno != 0)
else {
}
}
{
}
{
}
{
i_panic("output stream %s is missing error handling",
}
}
{
}
void (*callback)())
{
callback);
}
{
}
void *context)
{
}
{
}
{
}
{
}
{
return;
}
{
return;
if (stream->stream_errno != 0)
}
{
}
{
int ret = 1;
return -1;
}
}
return ret;
}
{
return;
}
{
}
{
}
{
return -1;
}
return -1;
}
return 1;
}
{
struct const_iovec iov;
}
unsigned int iov_count)
{
unsigned int i;
return -1;
}
for (i = 0, total_size = 0; i < iov_count; i++)
if (total_size == 0)
return 0;
if (ret < 0) {
} else {
}
}
return ret;
}
{
}
{
struct const_iovec iov;
}
unsigned int iov_count)
{
return;
}
{
}
{
return;
(void)o_stream_flush(stream);
}
{
}
{
}
}
{
}
{
outstream->stream_errno != 0)) {
return -1;
}
if (outstream->stream_errno != 0) {
} else {
}
}
return ret;
}
{
int ret;
return -1;
}
}
return ret;
}
{
struct const_iovec iov;
const unsigned char *data;
do {
/* all sent */
if (instream->stream_errno != 0)
return -1;
break;
}
if (ret <= 0) {
if (ret == 0)
break;
return -1;
}
}
{
}
bool close_parent)
{
}
{
}
static void
{
}
{
if (set) {
} else {
}
}
{
}
{
/* we already have quite a lot of data in parent stream.
unless we can flush it, don't add any more to it or we
could keep wasting memory by just increasing the buffer
size all the time. */
return -1;
}
return 0;
}
return 1;
}
{
int ret;
return 1;
return ret;
}
static void
void *context)
{
}
static void
{
}
static size_t
{
return 0;
else
}
static int
{
return -1;
}
static ssize_t
{
return -1;
}
return ret;
}
static int
const void *data ATTR_UNUSED,
{
return -1;
}
{
}
{
}
struct ostream *
{
}
}
}
}
{
struct ostream_private *stream;
return output;
}
struct ostream *
{
return output;
}
{
struct ostream_private *stream;
}