changeset 9074:995d501d8f41 HEAD

FETCH: If FETCH returned [EXPUNGEISSUED], it got stuck to all subsequent replies too.
author Timo Sirainen <tss@iki.fi>
date Fri, 22 May 2009 18:26:24 -0400
parents 90915833f106
children d77225a64128
files src/imap/cmd-fetch.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/cmd-fetch.c	Fri May 22 13:07:36 2009 -0400
+++ b/src/imap/cmd-fetch.c	Fri May 22 18:26:24 2009 -0400
@@ -132,11 +132,12 @@
 
 static bool cmd_fetch_finish(struct imap_fetch_context *ctx)
 {
+	static const char *ok_message = "OK Fetch completed.";
 	struct client_command_context *cmd = ctx->cmd;
-	static const char *ok_message = "OK Fetch completed.";
+	const char *tagged_reply = ok_message;
 
 	if (ctx->partial_fetch) {
-		ok_message = "OK ["IMAP_RESP_CODE_EXPUNGEISSUED"] "
+		tagged_reply = "OK ["IMAP_RESP_CODE_EXPUNGEISSUED"] "
 			"Some messages were already expunged.";
 	}
 
@@ -165,7 +166,7 @@
 	return cmd_sync(cmd,
 			(ctx->seen_flags_changed ? 0 : MAILBOX_SYNC_FLAG_FAST) |
 			(cmd->uid ? 0 : MAILBOX_SYNC_FLAG_NO_EXPUNGES), 0,
-			ok_message);
+			tagged_reply);
 }
 
 static bool cmd_fetch_continue(struct client_command_context *cmd)