]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Set command reason strings using the new human_args
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 4 Apr 2017 12:59:04 +0000 (15:59 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 6 Apr 2017 17:22:41 +0000 (20:22 +0300)
This way the reason string is already suitable for logging, since it's
guaranteed to be valid UTF-8 without control chars.

src/imap/imap-commands-util.c

index 81044ae60298813f19d5cac171565393342f8174..c9eaf988e0129cda5bd9fac607afdd3d9a6f14d3 100644 (file)
@@ -135,7 +135,7 @@ int client_open_save_dest_box(struct client_command_context *cmd,
 const char *imap_client_command_get_reason(struct client_command_context *cmd)
 {
        return cmd->args[0] == '\0' ? cmd->name :
-               t_strdup_printf("%s %s", cmd->name, cmd->args);
+               t_strdup_printf("%s %s", cmd->name, cmd->human_args);
 }
 
 void imap_transaction_set_cmd_reason(struct mailbox_transaction_context *trans,