dovecot-2.2: Minor code cleanup

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 29 23:16:12 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/09de25ccacb4
changeset: 14984:09de25ccacb4
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Aug 29 23:16:05 2012 +0300
description:
Minor code cleanup

diffstat:

 src/imap/cmd-append.c |  18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diffs (42 lines):

diff -r c9dbd649a78e -r 09de25ccacb4 src/imap/cmd-append.c
--- a/src/imap/cmd-append.c	Wed Aug 29 23:15:56 2012 +0300
+++ b/src/imap/cmd-append.c	Wed Aug 29 23:16:05 2012 +0300
@@ -147,6 +147,14 @@
 		mailbox_free(&ctx->box);
 }
 
+static void cmd_append_send_literal_continue(struct client *client)
+{
+	o_stream_nsend(client->output, "+ OK\r\n", 6);
+	o_stream_nflush(client->output);
+	o_stream_uncork(client->output);
+	o_stream_cork(client->output);
+}
+
 static int
 cmd_append_catenate_url(struct client_command_context *cmd, const char *caturl)
 {
@@ -397,10 +405,7 @@
 			cmd_append_finish(ctx);
 			return TRUE;
 		}
-		o_stream_nsend(client->output, "+ OK\r\n", 6);
-		o_stream_nflush(client->output);
-		o_stream_uncork(client->output);
-		o_stream_cork(client->output);
+		cmd_append_send_literal_continue(client);
 	}
 
 	i_assert(ctx->litinput != NULL);
@@ -716,10 +721,7 @@
 			cmd_append_finish(ctx);
 			return TRUE;
 		}
-		o_stream_nsend(client->output, "+ OK\r\n", 6);
-		o_stream_nflush(client->output);
-		o_stream_uncork(client->output);
-		o_stream_cork(client->output);
+		cmd_append_send_literal_continue(client);
 	}
 
 	i_assert(ctx->litinput != NULL);


More information about the dovecot-cvs mailing list