]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Add client_command_context.human_args
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 4 Apr 2017 12:58:42 +0000 (15:58 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 6 Apr 2017 17:22:41 +0000 (20:22 +0300)
Generated with imap_write_args_for_human()

src/imap/imap-client.c
src/imap/imap-client.h

index 1e19e3e1d81e96e70481804db681d8604d2834f4..c9e890351c5b05ee29fec29c0e987d9adbc97ce8 100644 (file)
@@ -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) {
index c71eb84d954ba615ea0c3e977233cfc9ca04961d..e97998f7c0b1147bf209a61c8935f650c988bc54 100644 (file)
@@ -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;