dovecot-2.2: doveadm-server: Fixed returning command input strea...

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 24 11:49:20 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/daa426965e5a
changeset: 18475:daa426965e5a
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Apr 24 14:47:43 2015 +0300
description:
doveadm-server: Fixed returning command input stream when its data was already in the input stream.

diffstat:

 src/doveadm/doveadm-mail.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 9974c748f72a -r daa426965e5a src/doveadm/doveadm-mail.c
--- a/src/doveadm/doveadm-mail.c	Fri Apr 24 14:25:06 2015 +0300
+++ b/src/doveadm/doveadm-mail.c	Fri Apr 24 14:47:43 2015 +0300
@@ -188,7 +188,11 @@
 		    doveadm_mail_cmd_input_input, ctx);
 	to = timeout_add(DOVEADM_MAIL_CMD_INPUT_TIMEOUT_MSECS,
 			 doveadm_mail_cmd_input_timeout, ctx);
-	io_loop_run(ioloop);
+	/* read the pending input from stream. */
+	io_loop_set_running(ioloop);
+	doveadm_mail_cmd_input_input(ctx);
+	if (io_loop_is_running(ioloop))
+		io_loop_run(ioloop);
 	io_remove(&io);
 	timeout_remove(&to);
 	io_loop_destroy(&ioloop);


More information about the dovecot-cvs mailing list