dovecot-2.2: imap: Assert-crashfix for URLFETCH command.

dovecot at dovecot.org dovecot at dovecot.org
Sun Sep 16 01:02:19 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/9d684784de9b
changeset: 15069:9d684784de9b
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Sep 16 01:02:10 2012 +0300
description:
imap: Assert-crashfix for URLFETCH command.

diffstat:

 src/imap/imap-client.c |  23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diffs (40 lines):

diff -r 002e0a120c2a -r 9d684784de9b src/imap/imap-client.c
--- a/src/imap/imap-client.c	Sun Sep 16 00:56:51 2012 +0300
+++ b/src/imap/imap-client.c	Sun Sep 16 01:02:10 2012 +0300
@@ -609,6 +609,14 @@
 	return cmd;
 }
 
+static void client_add_missing_io(struct client *client)
+{
+	if (client->io == NULL && !client->disconnected) {
+		client->io = io_add(client->fd_in,
+				    IO_READ, client_input, client);
+	}
+}
+
 void client_command_free(struct client_command_context **_cmd)
 {
 	struct client_command_context *cmd = *_cmd;
@@ -661,15 +669,12 @@
 	   unhandled commands since we may not be executing from client_input
 	   or client_output. */
 	if (state == CLIENT_COMMAND_STATE_WAIT_EXTERNAL &&
-	    !client->disconnected && client->to_delayed_input == NULL)
-		client->to_delayed_input = timeout_add(0, client_input, client);
-}
-
-static void client_add_missing_io(struct client *client)
-{
-	if (client->io == NULL && !client->disconnected) {
-		client->io = io_add(client->fd_in,
-				    IO_READ, client_input, client);
+	    !client->disconnected) {
+		client_add_missing_io(client);
+		if (client->to_delayed_input == NULL) {
+			client->to_delayed_input =
+				timeout_add(0, client_input, client);
+		}
 	}
 }
 


More information about the dovecot-cvs mailing list