Skip to content

Commit

Permalink
imap: Add client_command_context.human_args
Browse files Browse the repository at this point in the history
Generated with imap_write_args_for_human()
  • Loading branch information
sirainen committed Apr 4, 2017
1 parent 7293259 commit bf9e29e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/imap/imap-client.c
Expand Up @@ -663,6 +663,10 @@ bool client_read_args(struct client_command_context *cmd, unsigned int count,
imap_write_args(str, *args_r);
cmd->args = p_strdup(cmd->pool, str_c(str));

str_truncate(str, 0);
imap_write_args_for_human(str, *args_r);
cmd->human_args = p_strdup(cmd->pool, str_c(str));

cmd->client->input_lock = NULL;
return TRUE;
} else if (ret == -2) {
Expand Down
3 changes: 3 additions & 0 deletions src/imap/imap-client.h
Expand Up @@ -88,6 +88,9 @@ struct client_command_context {
arguments, so they may not be exactly the same as how client sent
them. */
const char *args;
/* Parameters for this command generated with
imap_write_args_for_human(), so it's suitable for logging. */
const char *human_args;
enum command_flags cmd_flags;
const char *tagline_reply;

Expand Down

0 comments on commit bf9e29e

Please sign in to comment.