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

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


details:   http://hg.dovecot.org/dovecot-2.0/rev/2da7dec937d4
changeset: 9279:2da7dec937d4
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 14 17:20:51 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/imap-client.c |    6 ++++--

diffs (23 lines):

diff -r e7a3c0e6ba0f -r 2da7dec937d4 src/imap/imap-client.c
--- a/src/imap/imap-client.c	Thu May 14 14:22:35 2009 -0400
+++ b/src/imap/imap-client.c	Thu May 14 17:20:51 2009 -0400
@@ -402,7 +402,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;
@@ -745,7 +746,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