iostream-rawlog.c revision f89eb8f2cda0bd6d40a9f96db1c92517f0593871
/* Copyright (c) 2011-2017 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "hostpid.h"
#include "ioloop.h"
#include "buffer.h"
#include "str.h"
#include "net.h"
#include "write-full.h"
#include "time-util.h"
#include "istream.h"
#include "ostream.h"
#include "iostream-private.h"
#include "iostream-rawlog-private.h"
#include "istream-rawlog.h"
#include "ostream-rawlog.h"
#include "iostream-rawlog.h"
#include <unistd.h>
#include <fcntl.h>
#define RAWLOG_MAX_LINE_LEN 8192
static void
{
return;
(unsigned int)ioloop_timeval.tv_usec);
}
}
{
}
static void
{
const unsigned char *p;
bool line_ends;
while (size > 0) {
if (p != NULL) {
break;
} else {
}
}
}
}
static void
{
if (!rstream->line_continued)
start = i;
}
}
}
}
{
return;
else
i_error("write(%s) failed: %s",
}
}
{
}
static void
{
struct ostream *old_output;
old_output = *output;
}
static int
iostream_rawlog_try_create_tcp(const char *path,
{
const char *host;
unsigned int ips_count;
/* tcp:host:port */
return 0;
path += 4;
return 0;
return 0;
if (ret != 0) {
return -1;
}
if (fd == -1) {
return -1;
}
return 1;
}
{
static unsigned int counter = 0;
int ret;
return ret < 0 ? -1 : 0;
return -1;
}
counter++;
}
{
struct ostream *old_output;
if (in_fd == -1) {
return -1;
}
if (out_fd == -1) {
i_close_fd(&in_fd);
return -1;
}
old_output = *output;
return 0;
}
{
return ret < 0 ? -1 : 0;
if (fd == -1) {
return -1;
}
return 0;
}
{
const enum iostream_rawlog_flags rawlog_flags =
struct ostream *old_output;
}
old_output = *output;
}
}