Mercurial > dovecot > core-2.2
changeset 18285:31c0b82250b6
lib-imap-client: Get capabilities again after reconnection to server.
This is needed most importantly if we're not using plaintext authentication
to log in.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 03 Mar 2015 17:25:33 +0200 |
parents | e270bf24491c |
children | ef0bfe110ed9 |
files | src/lib-imap-client/imapc-connection.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-imap-client/imapc-connection.c Tue Mar 03 01:05:49 2015 +0200 +++ b/src/lib-imap-client/imapc-connection.c Tue Mar 03 17:25:33 2015 +0200 @@ -400,6 +400,15 @@ conn->fd = -1; } + /* get capabilities again after reconnection. this is especially + important because post-login capabilities often do not contain AUTH= + capabilities. */ + conn->capabilities = 0; + if (conn->capabilities_list != NULL) { + p_strsplit_free(default_pool, conn->capabilities_list); + conn->capabilities_list = NULL; + } + imapc_connection_set_state(conn, IMAPC_CONNECTION_STATE_DISCONNECTED); imapc_connection_abort_commands(conn, NULL, reconnecting); }