]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: client: command: Add debug message showing what commands are being sent...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 6 Jan 2019 15:21:29 +0000 (16:21 +0100)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Thu, 4 Apr 2019 10:58:58 +0000 (13:58 +0300)
src/lib-smtp/smtp-client-command.c

index 569261eefd06c42baf75d2edf1496331855961e4..ba04bf7117dcf99e120768f5acc570cb52dad641 100644 (file)
@@ -485,7 +485,13 @@ void smtp_client_command_set_replies(struct smtp_client_command *cmd,
 static void
 smtp_client_command_sent(struct smtp_client_command *cmd)
 {
-       smtp_client_command_debug(cmd, "Sent");
+       if (cmd->data == NULL)
+               smtp_client_command_debug(cmd, "Sent");
+       else {
+               i_assert(str_len(cmd->data) > 2);
+               str_truncate(cmd->data, str_len(cmd->data)-2);
+               smtp_client_command_debug(cmd, "Sent: %s", str_c(cmd->data));
+       }
 
        if (smtp_client_command_name_equals(cmd, "QUIT"))
                cmd->conn->sent_quit = TRUE;