imap-master-connection.c revision bcb4e51a409d94ae670de96afb8483a4f7855294
/* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "connection.h"
#include "imap-master-connection.h"
#define IMAP_MASTER_CONNECTION_TIMEOUT_MSECS 30000
struct imap_master_connection {
struct connection conn;
void *context;
};
static struct connection_list *master_clients;
{
i_error("Timeout communicating with %s (version %sreceived)",
}
int imap_master_connection_init(const char *path,
void *context,
struct imap_master_connection **conn_r,
const char **error_r)
{
struct imap_master_connection *conn;
"net_connect_unix(%s) failed: %m", path);
return ret;
}
return 1;
}
{
}
{
struct imap_master_connection *conn =
(struct imap_master_connection *)_conn;
}
static int
{
struct imap_master_connection *conn =
(struct imap_master_connection *)_conn;
if (!_conn->version_received) {
return -1;
return 1;
} else {
/* we're finished now with this connection - disconnect it */
return -1;
}
}
static struct connection_settings client_set = {
.service_name_in = "imap-master",
.service_name_out = "imap-master",
.major_version = 1,
.minor_version = 0,
};
static const struct connection_vfuncs client_vfuncs = {
};
void imap_master_connections_init(void)
{
}
void imap_master_connections_deinit(void)
{
}