]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Replace o_stream_ignore_last_errors() with o_stream_abort() wherever possible
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 15 Nov 2017 10:57:34 +0000 (12:57 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 15 Nov 2017 20:35:40 +0000 (22:35 +0200)
src/lib-fs/fs-api.c
src/lib-mail/test-istream-attachment.c
src/lib-storage/index/dbox-common/dbox-file-fix.c
src/lib-storage/index/dbox-common/dbox-file.c
src/lib-storage/list/subscription-file.c
src/plugins/fts-squat/squat-uidlist.c

index 472371dcea9c68fe5597161695c4e0e7691ec811..b2683136d5f63ef126631d7953c372f0d88b7411 100644 (file)
@@ -770,7 +770,7 @@ static void fs_write_stream_abort(struct fs_file *file, struct ostream **output)
        i_assert(output != &file->output);
 
        *output = NULL;
-       o_stream_ignore_last_errors(file->output);
+       o_stream_abort(file->output);
        /* make sure we don't have an old error lying around */
        ret = fs_write_stream_finish_int(file, FALSE);
        i_assert(ret != 0);
index 16529138c78b7fea3464f7cab7eb7a397d804353..bad1bb121199916ae6d0366e4041dcf8d03b373a 100644 (file)
@@ -194,7 +194,7 @@ test_close_attachment_ostream_error(struct ostream *output,
 {
        if (success)
                *error = "test output error";
-       o_stream_ignore_last_errors(output);
+       o_stream_abort(output);
        o_stream_destroy(&output);
        return -1;
 }
index 6ed7904d28c1cf118abba79283befaf5e602410b..d9a472a44a8857141efeac3668b0bedfc751cf9b 100644 (file)
@@ -466,7 +466,7 @@ int dbox_file_fix(struct dbox_file *file, uoff_t start_offset)
        o_stream_cork(output);
        ret = dbox_file_fix_write_stream(file, start_offset, temp_path, output);
        if (ret < 0)
-               o_stream_ignore_last_errors(output);
+               o_stream_abort(output);
        have_messages = output->offset > file->file_header_size;
        o_stream_unref(&output);
        if (close(fd) < 0) {
index c7220ff71fae32e956fa180be2954c220d64be4e..1a02b15deb7b67dcbdaa25311300270b732b2667 100644 (file)
@@ -534,7 +534,7 @@ void dbox_file_append_rollback(struct dbox_file_append_context **_ctx)
                        dbox_file_set_syscall_error(file, "ftruncate()");
        }
        if (ctx->output != NULL) {
-               o_stream_ignore_last_errors(ctx->output);
+               o_stream_abort(ctx->output);
                o_stream_unref(&ctx->output);
        }
        i_free(ctx);
index 4b3d866cd99e5474ab57453f4417bdbcba75986f..a736c635bd77fefce2e1daff7b6bae2b700b2e7e 100644 (file)
@@ -242,7 +242,7 @@ int subsfile_set_subscribed(struct mailbox_list *list, const char *path,
                        }
                }
        } else {
-               o_stream_ignore_last_errors(output);
+               o_stream_abort(output);
        }
        o_stream_destroy(&output);
 
index 991677aaf38ab8cc48c9ae4587eba6da87cd7242..895c02c5b33b11f6b86120349fde7c4a740634d7 100644 (file)
@@ -1074,13 +1074,14 @@ int squat_uidlist_rebuild_finish(struct squat_uidlist_rebuild_context *ctx,
                        ret = -1;
                }
                ctx->build_ctx->need_reopen = TRUE;
+       } else {
+               o_stream_abort(ctx->output);
        }
 
        /* we no longer require the entire uidlist to be in memory,
           let it be used for something more useful. */
        squat_uidlist_free_from_memory(ctx->uidlist);
 
-       o_stream_ignore_last_errors(ctx->output);
        o_stream_unref(&ctx->output);
        if (close(ctx->fd) < 0)
                i_error("close(%s) failed: %m", temp_path);