Mercurial > dovecot > core-2.2
changeset 21890:a22fe3e86e90
lib-imap-client: Make authentication failures more consistent
This way they always say the same prefix, which is easier to
spot.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Fri, 31 Mar 2017 10:57:14 +0300 |
parents | 35f589fd7a93 |
children | 61428c866387 |
files | src/lib-imap-client/imapc-connection.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-imap-client/imapc-connection.c Fri Mar 31 10:49:50 2017 +0300 +++ b/src/lib-imap-client/imapc-connection.c Fri Mar 31 10:57:14 2017 +0300 @@ -160,11 +160,14 @@ } static void -imapc_auth_failed(struct imapc_connection *conn, const struct imapc_command_reply *reply, +imapc_auth_failed(struct imapc_connection *conn, const struct imapc_command_reply *_reply, const char *error) { - i_error("imapc(%s): Authentication failed: %s", conn->name, error); - imapc_login_callback(conn, reply); + struct imapc_command_reply reply = *_reply; + reply.text_without_resp = reply.text_full = + t_strdup_printf("Authentication failed: %s", error); + i_error("imapc(%s): %s", conn->name, reply.text_full); + imapc_login_callback(conn, &reply); if (conn->client->state_change_callback == NULL) return;