dovecot-2.2: imapc: If auth fails due to connection failure, don...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jun 2 19:49:48 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/4f66f717fe87
changeset: 18807:4f66f717fe87
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jun 02 22:47:21 2015 +0300
description:
imapc: If auth fails due to connection failure, don't treat it the same as failed login.

diffstat:

 src/lib-storage/index/imapc/imapc-storage.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 75d7bf7560d3 -r 4f66f717fe87 src/lib-storage/index/imapc/imapc-storage.c
--- a/src/lib-storage/index/imapc/imapc-storage.c	Tue Jun 02 22:20:03 2015 +0300
+++ b/src/lib-storage/index/imapc/imapc-storage.c	Tue Jun 02 22:47:21 2015 +0300
@@ -212,12 +212,20 @@
 	client->auth_failed = TRUE;
 
 	if (client->_storage != NULL) {
-		mail_storage_set_error(&client->_storage->storage,
-				       MAIL_ERROR_PERM, reply->text_full);
+		if (reply->state == IMAPC_COMMAND_STATE_DISCONNECTED)
+			mail_storage_set_internal_error(&client->_storage->storage);
+		else {
+			mail_storage_set_error(&client->_storage->storage,
+					       MAIL_ERROR_PERM, reply->text_full);
+		}
 	}
 	if (client->_list != NULL) {
-		mailbox_list_set_error(&client->_list->list,
-				       MAIL_ERROR_PERM, reply->text_full);
+		if (reply->state == IMAPC_COMMAND_STATE_DISCONNECTED)
+			mailbox_list_set_internal_error(&client->_list->list);
+		else {
+			mailbox_list_set_error(&client->_list->list,
+					       MAIL_ERROR_PERM, reply->text_full);
+		}
 	}
 }
 


More information about the dovecot-cvs mailing list