[dovecot-cvs] dovecot/src/imap cmd-append.c,1.71,1.72

cras at dovecot.org cras at dovecot.org
Thu Jan 26 23:08:56 EET 2006


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv23800/src/imap

Modified Files:
	cmd-append.c 
Log Message:
If there had been enough sync changes while APPEND was being done, we never
reset flush callback to _client_output, which could have caused hangs later.



Index: cmd-append.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-append.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- cmd-append.c	14 Jan 2006 18:47:21 -0000	1.71
+++ cmd-append.c	26 Jan 2006 21:08:53 -0000	1.72
@@ -58,10 +58,10 @@
 	}
 
 	if (cmd->func(cmd)) {
-		/* command execution was finished */
-		client->bad_counter = 0;
-		_client_reset_command(client);
-
+		/* command execution was finished. Note that if cmd_sync()
+		   didn't finish, we didn't get here but the input handler
+		   has already been moved. So don't do anything important
+		   here.. */
 		if (client->input_pending)
 			_client_input(client);
 	}
@@ -120,6 +120,9 @@
 
 	if (ctx->box != ctx->cmd->client->mailbox && ctx->box != NULL)
 		mailbox_close(&ctx->box);
+
+	ctx->client->bad_counter = 0;
+	_client_reset_command(ctx->client);
 }
 
 static bool cmd_append_continue_cancel(struct client_command_context *cmd)



More information about the dovecot-cvs mailing list