/* Copyright (c) 2011-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "llist.h"
#include "istream.h"
#include "ostream.h"
#include "strescape.h"
#include "master-service.h"
#include "indexer-queue.h"
#include "indexer-client.h"
#include <unistd.h>
#define INDEXER_CLIENT_PROTOCOL_MINOR_VERSION 0
struct indexer_client {
int refcount;
int fd;
};
struct indexer_client_request {
unsigned int tag;
};
static unsigned int clients_count = 0;
static const char *const*
{
const char *line;
return NULL;
return t_strsplit_tabescaped(line);
}
static int
{
/* <tag> <user> <mailbox> [<max_recent_msgs> [<session ID>]] */
*error_r = "Wrong parameter count";
return -1;
}
*error_r = "Invalid tag";
return -1;
}
max_recent_msgs = 0;
*error_r = "Invalid max_recent_msgs";
return -1;
} else {
}
if (tag != 0) {
}
return 0;
}
static int
{
unsigned int tag;
/* <tag> <user> <mailbox> */
*error_r = "Wrong parameter count";
return -1;
}
*error_r = "Invalid tag";
return -1;
}
if (tag != 0) {
}
return 0;
}
static int
{
args++;
else {
return -1;
}
}
{
case -2:
i_error("BUG: Client connection sent too much data");
return;
case -1:
return;
}
if (!client->version_received) {
return;
i_error("Client not compatible with this server "
"(mixed old and new binaries?)");
return;
}
}
break;
}
}
}
}
{
T_BEGIN {
} T_END;
}
}
struct indexer_client *
{
return client;
}
{
return;
i_error("close(client) failed: %m");
}
{
}
{
return;
}
unsigned int indexer_clients_get_count(void)
{
return clients_count;
}
void indexer_clients_destroy_all(void)
{
}