diff --git a/src/doveadm/dsync/dsync-mailbox-import.c b/src/doveadm/dsync/dsync-mailbox-import.c index c82da81f23..148c8dd5b7 100644 --- a/src/doveadm/dsync/dsync-mailbox-import.c +++ b/src/doveadm/dsync/dsync-mailbox-import.c @@ -372,13 +372,11 @@ dsync_istreams_cmp(struct istream *input1, struct istream *input2, int *cmp_r) i_stream_skip(input2, size); } if (input1->stream_errno != 0) { - errno = input1->stream_errno; i_error("read(%s) failed: %s", i_stream_get_name(input1), i_stream_get_error(input1)); return -1; } if (input2->stream_errno != 0) { - errno = input2->stream_errno; i_error("read(%s) failed: %s", i_stream_get_name(input2), i_stream_get_error(input2)); return -1; diff --git a/src/imap/cmd-append.c b/src/imap/cmd-append.c index ad72018351..3d9a3d1f04 100644 --- a/src/imap/cmd-append.c +++ b/src/imap/cmd-append.c @@ -213,7 +213,6 @@ cmd_append_catenate_mpurl(struct client_command_context *cmd, } if (mpresult.input->stream_errno != 0) { - errno = mpresult.input->stream_errno; mail_storage_set_critical(ctx->box->storage, "read(%s) failed: %s (for CATENATE URL %s)", i_stream_get_name(mpresult.input), diff --git a/src/imap/cmd-urlfetch.c b/src/imap/cmd-urlfetch.c index c08ead0a50..b9b01fc5c8 100644 --- a/src/imap/cmd-urlfetch.c +++ b/src/imap/cmd-urlfetch.c @@ -111,7 +111,6 @@ static int cmd_urlfetch_transfer_literal(struct client_command_context *cmd) return -1; } if (ctx->input->stream_errno != 0) { - errno = ctx->input->stream_errno; i_error("read(%s) failed: %s (URLFETCH)", i_stream_get_name(ctx->input), i_stream_get_error(ctx->input)); diff --git a/src/lib-http/http-client-request.c b/src/lib-http/http-client-request.c index 6bfdc54b58..536351c971 100644 --- a/src/lib-http/http-client-request.c +++ b/src/lib-http/http-client-request.c @@ -820,14 +820,12 @@ int http_client_request_send_more(struct http_client_request *req, /* we're in the middle of sending a request, so the connection will also have to be aborted */ - errno = req->payload_input->stream_errno; *error_r = t_strdup_printf("read(%s) failed: %s", i_stream_get_name(req->payload_input), i_stream_get_error(req->payload_input)); return -1; } else if (output->stream_errno != 0) { /* failed to send request */ - errno = output->stream_errno; *error_r = t_strdup_printf("write(%s) failed: %s", o_stream_get_name(output), o_stream_get_error(output)); diff --git a/src/lib-imap-storage/imap-msgpart.c b/src/lib-imap-storage/imap-msgpart.c index 37e85b9ee9..c40627dc79 100644 --- a/src/lib-imap-storage/imap-msgpart.c +++ b/src/lib-imap-storage/imap-msgpart.c @@ -394,7 +394,6 @@ imap_msgpart_get_partial_header(struct mail *mail, struct istream *mail_input, } if (message_get_header_size(input, &hdr_size, &has_nuls) < 0) { - errno = input->stream_errno; mail_storage_set_critical(mail->box->storage, "read(%s) failed: %s", i_stream_get_name(mail_input), i_stream_get_error(mail_input)); diff --git a/src/lib-storage/index/index-mail-binary.c b/src/lib-storage/index/index-mail-binary.c index e378185733..7f604dbe2e 100644 --- a/src/lib-storage/index/index-mail-binary.c +++ b/src/lib-storage/index/index-mail-binary.c @@ -114,7 +114,6 @@ add_binary_part(struct binary_ctx *ctx, const struct message_part *part, message_parse_header_deinit(&parser); if (ctx->input->stream_errno != 0) { - errno = ctx->input->stream_errno; mail_storage_set_critical(ctx->mail->box->storage, "read(%s) failed: %s", i_stream_get_name(ctx->input), i_stream_get_error(ctx->input));