changeset 13436:960907bfc29e

imapc: If NOOP fails with disconnection, set "internal error" to storage.
author Timo Sirainen <tss@iki.fi>
date Thu, 08 Sep 2011 16:51:51 +0300
parents 283e08771d92
children ec947cc9c9c7
files src/lib-storage/index/imapc/imapc-storage.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-storage.c	Thu Sep 08 16:37:56 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-storage.c	Thu Sep 08 16:51:51 2011 +0300
@@ -156,9 +156,11 @@
 
 	if (reply->state == IMAPC_COMMAND_STATE_OK)
 		;
-	else if (reply->state == IMAPC_COMMAND_STATE_NO) {
+	else if (reply->state == IMAPC_COMMAND_STATE_NO)
 		imapc_copy_error_from_reply(storage, MAIL_ERROR_PARAMS, reply);
-	} else if (reply->state != IMAPC_COMMAND_STATE_DISCONNECTED) {
+	else if (reply->state == IMAPC_COMMAND_STATE_DISCONNECTED)
+		mail_storage_set_internal_error(&storage->storage);
+	else {
 		mail_storage_set_critical(&storage->storage,
 			"imapc: NOOP failed: %s", reply->text_full);
 	}