Mercurial > dovecot > core-2.2
changeset 21895:76327526ee5c
imap: Add client_command_context.human_args
Generated with imap_write_args_for_human()
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 04 Apr 2017 15:58:42 +0300 |
parents | cb05b557fd74 |
children | db6da4cbd052 |
files | src/imap/imap-client.c src/imap/imap-client.h |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-client.c Tue Apr 04 15:58:15 2017 +0300 +++ b/src/imap/imap-client.c Tue Apr 04 15:58:42 2017 +0300 @@ -663,6 +663,10 @@ 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) {
--- a/src/imap/imap-client.h Tue Apr 04 15:58:15 2017 +0300 +++ b/src/imap/imap-client.h Tue Apr 04 15:58:42 2017 +0300 @@ -88,6 +88,9 @@ 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;