changeset 22755:59ac434fef3f

lib-imap-client: Fix reason text when unselecting mailbox aborts commands
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 17 Jan 2018 15:02:09 +0200
parents 209a63ed9de1
children 1f74202e9f70
files src/lib-imap-client/imapc-connection.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-imap-client/imapc-connection.c	Mon Dec 25 21:31:05 2017 +0200
+++ b/src/lib-imap-client/imapc-connection.c	Wed Jan 17 15:02:09 2018 +0200
@@ -338,8 +338,13 @@
 	   callback recurses us back here we don't crash */
 	i_zero(&reply);
 	reply.state = IMAPC_COMMAND_STATE_DISCONNECTED;
-	reply.text_without_resp = reply.text_full =
-		"Disconnected from server";
+	if (only_box != NULL) {
+		reply.text_without_resp = reply.text_full =
+			"Unselecting mailbox";
+	} else {
+		reply.text_without_resp = reply.text_full =
+			"Disconnected from server";
+	}
 	array_foreach(&tmp_array, cmdp) {
 		cmd = *cmdp;