config-connection.c revision 3c00540a27bc1e7636ab2b52c3baae9ed9ec9aa6
/* Copyright (C) 2005-2009 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "array.h"
#include "str.h"
#include "ioloop.h"
#include "network.h"
#include "istream.h"
#include "ostream.h"
#include "env-util.h"
#include "config-connection.h"
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#define MAX_INBUF_SIZE 1024
#define CONFIG_CLIENT_PROTOCOL_MAJOR_VERSION 1
#define CONFIG_CLIENT_PROTOCOL_MINOR_VERSION 0
struct config_connection {
int fd;
unsigned int version_received:1;
unsigned int handshaked:1;
};
static const char *const *
{
const char *line;
return NULL;
}
const char *const *args,
enum config_dump_flags flags)
{
const char *const *strings;
unsigned int i, count;
/* <process> [<args>] */
for (i = 0; i < count; i += 2) {
str_truncate(str, 0);
}
}
static void config_connection_input(void *context)
{
case -2:
i_error("BUG: Config client connection sent too much data");
return;
case -1:
return;
}
if (!conn->version_received) {
return;
i_error("Config client not compatible with this server "
"(mixed old and new binaries?)");
return;
}
}
t_push();
continue;
}
t_pop();
}
{
struct config_connection *conn;
return conn;
}
{
i_error("close(config conn) failed: %m");
}
enum config_dump_flags flags)
{
struct config_connection *conn;
}
void config_connection_putenv(void)
{
const char *const *strings;
unsigned int i, count;
} T_END;
}