From: Timo Sirainen Date: Fri, 27 Oct 2017 20:31:32 +0000 (+0300) Subject: global: Remove unnecessary o_stream_nflush() calls X-Git-Tag: 2.3.0.rc1~713 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f81141f5ade2c5c946852efbb4ec6412bf074949;p=thirdparty%2Fdovecot%2Fcore.git global: Remove unnecessary o_stream_nflush() calls The following o_stream_nfinish() or o_stream_uncork() calls it anyway. --- diff --git a/src/imap/cmd-append.c b/src/imap/cmd-append.c index 93777285b6..823e675ef0 100644 --- a/src/imap/cmd-append.c +++ b/src/imap/cmd-append.c @@ -158,7 +158,6 @@ static bool cmd_append_send_literal_continue(struct cmd_append_context *ctx) } o_stream_nsend(ctx->client->output, "+ OK\r\n", 6); - o_stream_nflush(ctx->client->output); o_stream_uncork(ctx->client->output); o_stream_cork(ctx->client->output); return TRUE; diff --git a/src/imap/cmd-setmetadata.c b/src/imap/cmd-setmetadata.c index 34e51f6067..74b24b463c 100644 --- a/src/imap/cmd-setmetadata.c +++ b/src/imap/cmd-setmetadata.c @@ -184,7 +184,6 @@ cmd_setmetadata_entry(struct imap_setmetadata_context *ctx, return 1; case IMAP_ARG_LITERAL_SIZE: o_stream_nsend(ctx->cmd->client->output, "+ OK\r\n", 6); - o_stream_nflush(ctx->cmd->client->output); o_stream_uncork(ctx->cmd->client->output); o_stream_cork(ctx->cmd->client->output); /* fall through */ diff --git a/src/imap/imap-client.c b/src/imap/imap-client.c index d4c8f65981..6f31b921e4 100644 --- a/src/imap/imap-client.c +++ b/src/imap/imap-client.c @@ -489,7 +489,6 @@ void client_disconnect(struct client *client, const char *reason) client->disconnected = TRUE; client->disconnect_reason = p_strdup(client->pool, reason); - o_stream_nflush(client->output); o_stream_uncork(client->output); i_stream_close(client->input); diff --git a/src/lib-http/http-server-connection.c b/src/lib-http/http-server-connection.c index c17df3c205..1b52dd141e 100644 --- a/src/lib-http/http-server-connection.c +++ b/src/lib-http/http-server-connection.c @@ -1167,10 +1167,8 @@ http_server_connection_disconnect(struct http_server_connection *conn, http_server_connection_timeout_stop(conn); io_remove(&conn->io_resp_payload); - if (conn->conn.output != NULL) { - o_stream_nflush(conn->conn.output); + if (conn->conn.output != NULL) o_stream_uncork(conn->conn.output); - } if (conn->http_parser != NULL) http_request_parser_deinit(&conn->http_parser); diff --git a/src/lib-index/mail-index-write.c b/src/lib-index/mail-index-write.c index 69ff718567..b01ef80f28 100644 --- a/src/lib-index/mail-index-write.c +++ b/src/lib-index/mail-index-write.c @@ -83,7 +83,6 @@ static int mail_index_recreate(struct mail_index *index) map->hdr.header_size - base_size); o_stream_nsend(output, map->rec_map->records, map->rec_map->records_count * map->hdr.record_size); - o_stream_nflush(output); if (o_stream_nfinish(output) < 0) { mail_index_file_set_syscall_error(index, path, "write()"); ret = -1;