dovecot-1.2: imap: When multiple commands are pipelined, try har...

dovecot at dovecot.org dovecot at dovecot.org
Fri May 15 00:20:07 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/421393827a81
changeset: 9027:421393827a81
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 14 17:20:02 2009 -0400
description:
imap: When multiple commands are pipelined, try harder to combine their mailbox syncing together.

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/imap/client.c |    6 ++++--

diffs (23 lines):

diff -r cbeae4ef9af5 -r 421393827a81 src/imap/client.c
--- a/src/imap/client.c	Wed May 13 13:32:13 2009 -0400
+++ b/src/imap/client.c	Thu May 14 17:20:02 2009 -0400
@@ -376,7 +376,8 @@ client_command_find_with_flags(struct cl
 
 	cmd = new_cmd->client->command_queue;
 	for (; cmd != NULL; cmd = cmd->next) {
-		if (cmd != new_cmd && (cmd->cmd_flags & flags) != 0)
+		if (cmd->state < CLIENT_COMMAND_STATE_WAIT_SYNC &&
+		    cmd != new_cmd && (cmd->cmd_flags & flags) != 0)
 			return cmd;
 	}
 	return NULL;
@@ -718,7 +719,8 @@ bool client_handle_input(struct client *
 		if (!handled_commands)
 			return FALSE;
 
-		ret = cmd_sync_delayed(client);
+		ret = client->input_lock != NULL ? TRUE :
+			cmd_sync_delayed(client);
 		if (ret)
 			client_continue_pending_input(&client);
 		return TRUE;


More information about the dovecot-cvs mailing list