]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Remove unnecessary o_stream_nflush() calls
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 27 Oct 2017 20:31:32 +0000 (23:31 +0300)
committerTimo Sirainen <tss@dovecot.fi>
Mon, 30 Oct 2017 11:04:53 +0000 (13:04 +0200)
The following o_stream_nfinish() or o_stream_uncork() calls it anyway.

src/imap/cmd-append.c
src/imap/cmd-setmetadata.c
src/imap/imap-client.c
src/lib-http/http-server-connection.c
src/lib-index/mail-index-write.c

index 93777285b60341fbb0f7c52f7d3991c4f96d0ada..823e675ef01a2529872ea01e2a33abbacc5e2eae 100644 (file)
@@ -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;
index 34e51f606743e28e2fa524e562cffdf8d0256d62..74b24b463c5647e14cc64e77358e321f8770743b 100644 (file)
@@ -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 */
index d4c8f65981c564e88303271b73fa6a9dc44132b5..6f31b921e407f1a6fc277ee760236dc7e59721cf 100644 (file)
@@ -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);
index c17df3c205a968328a382020f00482aadfc1a73e..1b52dd141e2d2f3c81ea84dd7fb5a7ab6ddcca4f 100644 (file)
@@ -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);
index 69ff718567813c5e8b02e6cd23f0257f61592467..b01ef80f2870ca1d2d5b4c1d91a63290db07d06a 100644 (file)
@@ -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;