imap-login-cmd-id.c revision 5329bb264c32fa887e53063ff53272160cb8d7e8
/* Copyright (c) 2002-2017 Dovecot authors, see the included COPYING file */
#include "login-common.h"
#include "str.h"
#include "imap-parser.h"
#include "imap-quote.h"
#include "imap-login-settings.h"
#include "imap-login-client.h"
struct imap_id_param_handler {
const char *key;
bool key_is_prefix;
};
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
/* nothing */
}
}
static void
{
}
}
static void
{
}
static const struct imap_id_param_handler imap_login_id_params[] = {
};
static const struct imap_id_param_handler *
imap_id_param_handler_find(const char *key)
{
return &imap_login_id_params[i];
}
return NULL;
}
static bool
{
const struct imap_id_param_handler *handler;
return FALSE;
/* do not try to process NIL values as client-info,
but store them for non-reserved keys */
return TRUE;
}
{
bool client_id_str;
/* length of key + length of value (NIL for NULL) and two set of
quotes and space */
} else {
}
else
}
}
{
return 1;
return -1;
/* no ID logging */
/* already logged the ID reply */
} else {
/* log all keys */
} else {
/* log only specified keys */
}
}
break;
case IMAP_CLIENT_ID_STATE_KEY:
return -1;
return -1;
break;
return -1;
break;
}
return 0;
}
{
/* finished handling the parameters */
}
}
t_strdup_printf("* ID %s\r\n",
}
{
}
{
struct imap_client_cmd_id *id;
int ret;
} else {
}
"Invalid ID parameters");
return -1;
}
if (ret > 0) {
/* NIL parameter */
ret = 0;
break;
}
}
if (ret == 0) {
/* finished the line */
return 1;
} else if (ret == -1) {
return 0;
return -1;
} else {
return 0;
}
}