/* Copyright (c) 2005-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "ostream.h"
#include "str.h"
#include "strescape.h"
#include "stats-dist.h"
#include "time-util.h"
#include "dict-client.h"
#include "dict-settings.h"
#include "dict-connection.h"
#include "dict-commands.h"
#include "main.h"
struct dict_cmd_func {
};
struct dict_connection_cmd {
char *reply;
unsigned int async_reply_id;
};
{
const char *error;
}
}
{
unsigned int i, count;
for (i = 0; i < count; i++) {
return;
}
}
i_unreached();
}
{
cmd = *first_cmdp;
/* we may be able to start outputting iterations now. */
(void)cmd_iterate_flush(cmd);
/* command not finished yet */
break;
}
}
}
{
return;
}
}
{
return;
if (cmd->async_reply_id == 0)
}
static void
{
long long diff;
if (!dict_settings->verbose_proctitle)
return;
if (diff < 0)
diff = 0;
}
static void
{
return;
(long)ioloop_timeval.tv_sec,
(unsigned int)ioloop_timeval.tv_usec);
}
static void
{
return;
}
/* the results get double-tabescaped so they end up becoming a single
parameter */
}
}
static void
{
} else {
}
}
{
/* <key> */
return 1;
}
{
/* continue later when there's more space
in output buffer */
return FALSE;
}
/* flushed everything, continue */
}
return TRUE;
}
{
return 0;
str_truncate(str, 0);
if (cmd->async_reply_id != 0) {
}
return 0;
}
/* wait for the next iteration callback */
return 0;
}
str_truncate(str, 0);
}
return 1;
}
{
}
{
const char *const *args;
unsigned int flags;
i_error("dict client: ITERATE: broken input");
return -1;
}
/* <flags> <max_rows> <path> */
if (max_rows > 0)
return 1;
}
static struct dict_connection_transaction *
unsigned int id)
{
return NULL;
return transaction;
}
return NULL;
}
static void
unsigned int id)
{
unsigned int i, count;
for (i = 0; i < count; i++) {
return;
}
}
i_unreached();
}
{
unsigned int id;
return -1;
}
return -1;
}
/* <id> */
return 0;
}
static int
const char *line,
struct dict_connection_transaction **trans_r)
{
unsigned int id;
return -1;
}
return -1;
}
return 0;
}
static void
{
char chr;
case DICT_COMMIT_RET_OK:
break;
case DICT_COMMIT_RET_NOTFOUND:
break;
break;
case DICT_COMMIT_RET_FAILED:
default:
break;
}
if (async)
if (chr != DICT_PROTOCOL_REPLY_OK &&
}
}
void *context)
{
}
void *context)
{
}
static int
{
return -1;
return 1;
}
static int
{
return -1;
return 1;
}
{
return -1;
return 0;
}
{
const char *const *args;
/* <id> <key> <value> */
i_error("dict client: SET: broken input");
return -1;
}
return -1;
return 0;
}
{
const char *const *args;
/* <id> <key> */
i_error("dict client: UNSET: broken input");
return -1;
}
return -1;
return 0;
}
{
const char *const *args;
long long diff;
/* <id> <key> <diff> */
i_error("dict client: ATOMIC_INC: broken input");
return -1;
}
return -1;
return 0;
}
{
const char *const *args;
long long tv_sec;
unsigned int tv_nsec;
/* <id> <secs> <nsecs> */
i_error("dict client: TIMESTAMP: broken input");
return -1;
}
return -1;
};
return 0;
}
{ DICT_PROTOCOL_CMD_SET, cmd_set },
{ 0, NULL }
};
{
unsigned int i;
return &cmds[i];
}
return NULL;
}
{
int ret;
return -1;
}
return ret;
}
return 0;
}
{
/* only iterators may be returning a lot of data */
/* not an iterator */
} else if (cmd_iterate_flush(cmd) == 0) {
/* unfinished */
} else {
/* cmd should be freed now, restart output */
return TRUE;
}
break;
/* try to flush the rest */
}
return FALSE;
}
{
break;
}
}
{
if (*first_cmdp != cmd)
return;
}
}
void dict_commands_init(void)
{
}
void dict_commands_deinit(void)
{
}