/* Copyright (c) 2011-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "buffer.h"
#include "base64.h"
#include "ioloop.h"
#include "llist.h"
#include "global-memory.h"
#include "stats-settings.h"
#include "mail-stats.h"
#include "mail-session.h"
#include "mail-command.h"
/* commands are sorted by their last_update timestamp, oldest first */
{
}
static struct mail_command *
{
/* fast path for new commands */
return NULL;
}
return cmd;
}
/* expired */
return NULL;
}
static struct mail_command *
const char *args)
{
return cmd;
}
{
}
{
}
{
}
{
const char *error;
unsigned int i, cmd_id;
/* <session guid> <cmd id> [d] <name> <args> <stats>
<session guid> <cmd id> c[d] <stats> */
*error_r = "UPDATE-CMD: Too few parameters";
return -1;
}
return -1;
*error_r = "UPDATE-CMD: Invalid command id";
return -1;
}
switch (args[2][i]) {
case 'd':
break;
case 'c':
break;
default:
*error_r = "UPDATE-CMD: Invalid flags parameter";
return -1;
}
}
if (!continued) {
/* new command */
*error_r = "UPDATE-CMD: Duplicate new command id";
return -1;
}
*error_r = "UPDATE-CMD: Too few parameters";
return -1;
}
args += 5;
} else {
/* already expired command, ignore */
i_warning("UPDATE-CMD: Already expired");
return 0;
}
args += 3;
}
return -1;
}
return -1;
}
return -1;
}
if (done) {
}
return 0;
}
{
/* some commands like IDLE can run forever */
}
void mail_commands_free_memory(void)
{
unsigned int diff;
while (stable_mail_commands_head != NULL) {
/* session was probably lost */
} else {
break;
}
break;
break;
}
}
void mail_commands_init(void)
{
}
void mail_commands_deinit(void)
{
while (stable_mail_commands_head != NULL) {
}
}