config-connection.c revision 27a44fcfd8d19bffe0f267f20a2b5d3fe7600fdd
/* Copyright (c) 2005-2012 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "llist.h"
#include "istream.h"
#include "ostream.h"
#include "settings-parser.h"
#include "master-service.h"
#include "master-service-settings.h"
#include "config-request.h"
#include "config-parser.h"
#include "config-connection.h"
#include <stdlib.h>
#include <unistd.h>
#define MAX_INBUF_SIZE 1024
#define CONFIG_CLIENT_PROTOCOL_MAJOR_VERSION 2
#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;
return t_strsplit_tab(line);
}
static void
{
const char *p;
value = p+1;
}
}
const char *const *args)
{
struct config_export_context *ctx;
struct master_service_settings_output output;
struct config_filter filter;
/* [<args>] */
32 : 128;
}
32 : 128;
}
}
}
/* master reads configuration only when reloading settings */
return -1;
}
}
const char *const *s;
t_strdup_printf("service=%s\t", *s));
}
}
if (output.service_uses_local)
if (output.used_local)
if (output.used_remote)
if (config_export_finish(&ctx) < 0) {
return -1;
}
return 0;
}
{
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;
}
}
continue;
break;
}
}
}
{
struct config_connection *conn;
return conn;
}
{
i_error("close(config conn) failed: %m");
}
void config_connections_destroy_all(void)
{
while (config_connections != NULL)
}