#include "ostream.h"
#include "var-expand.h"
#include "imap-resp-code.h"
+#include "imap-util.h"
#include "mail-namespace.h"
#include "commands.h"
bool client_read_args(struct client_command_context *cmd, unsigned int count,
unsigned int flags, const struct imap_arg **args_r)
{
+ string_t *str;
int ret;
i_assert(count <= INT_MAX);
/* all parameters read successfully */
i_assert(cmd->client->input_lock == NULL ||
cmd->client->input_lock == cmd);
+
+ str = t_str_new(256);
+ imap_args_to_str(str, *args_r);
+ cmd->args = p_strdup(cmd->pool, str_c(str));
+
cmd->client->input_lock = NULL;
return TRUE;
} else if (ret == -2) {
struct client *client;
pool_t pool;
+ /* IMAP command tag */
const char *tag;
+ /* Name of this command */
const char *name;
+ /* Parameters for this command. These are generated from parsed IMAP
+ arguments, so they may not be exactly the same as how client sent
+ them. */
+ const char *args;
enum command_flags cmd_flags;
command_func_t *func;