iostream-rawlog.c revision 4c05697a4f3958c836e23e1eff5b4b7c49ef6617
/* Copyright (c) 2011-2012 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "hostpid.h"
#include "ioloop.h"
#include "buffer.h"
#include "str.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 int
{
return -1;
i_error("rawlog_istream.write(%s) failed: %m",
return -1;
}
return 0;
}
static int
{
(unsigned long)ioloop_timeval.tv_sec,
(unsigned int)ioloop_timeval.tv_usec);
}
}
{
}
static void
{
if (!rstream->line_continued) {
return;
}
return;
start = i;
}
}
return;
}
}
{
const unsigned char *p;
bool line_ends;
return;
}
if (p != NULL) {
return;
} else {
}
break;
break;
}
break;
}
}
{
i_error("rawlog_istream.close(%s) failed: %m",
}
}
}
{
static unsigned int counter = 0;
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;
}
{
struct ostream *old_output;
int fd;
if (fd == -1) {
return -1;
}
old_output = *output;
return 0;
}