/* Copyright (c) 2011-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "ioloop.h"
#include "istream.h"
#include "ostream.h"
#include "llist.h"
#include "strescape.h"
#include "master-service.h"
#include "ipc-group.h"
#include "ipc-connection.h"
#include <unistd.h>
#define IPC_SERVER_PROTOCOL_MINOR_VERSION 0
static unsigned int connection_id_counter;
const char *reason)
{
unsigned int i, count;
for (i = 0; i < count; i++) {
break;
}
}
}
}
static struct ipc_connection_cmd *
{
return *cmdp;
}
return NULL;
}
static int
{
unsigned int tag;
char *data;
/* <tag> [:+-]<data> */
return -1;
*data++ = '\0';
return -1;
switch (data[0]) {
case ':':
break;
case '+':
break;
case '-':
break;
default:
return -1;
}
data++;
return 0;
}
if (status != IPC_CMD_STATUS_REPLY) {
}
return 0;
}
{
const char *const *args;
char *line;
int ret;
return;
}
if (!conn->version_received) {
return;
"IPC server not compatible with this server "
"(mixed old and new binaries?)");
return;
}
}
if (!conn->handshake_received) {
return;
"IPC server sent invalid handshake");
return;
}
"IPC server named itself unexpectedly: %s "
"(existing ones were %s)",
return;
}
return;
}
}
T_BEGIN {
} T_END;
if (ret < 0) {
"Invalid input from IPC server '%s': %s",
break;
}
}
}
{
return conn;
}
{
if (log_error)
}
i_error("close(ipc connection) failed: %m");
}
struct ipc_connection *
{
return conn;
}
return NULL;
}
{
T_BEGIN {
} T_END;
}