]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Remove index_storage_save_continue
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 12 May 2017 10:35:06 +0000 (13:35 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 12 May 2017 10:35:29 +0000 (13:35 +0300)
It was not intended for v2.2

src/lib-storage/index/index-storage.c
src/lib-storage/index/index-storage.h

index 87549db6d218e8ce2cfb28302f013f0943288b4f..9c4e7195b69183b2ccd2b1987b99b5bb3680a711 100644 (file)
@@ -1073,48 +1073,6 @@ int index_storage_expunged_sync_begin(struct mailbox *box,
        return 1;
 }
 
-int index_storage_save_continue(struct mail_save_context *ctx,
-                               struct istream *input,
-                               struct mail *cache_dest_mail)
-{
-       struct mail_storage *storage = ctx->transaction->box->storage;
-
-       do {
-               switch (o_stream_send_istream(ctx->data.output, input)) {
-               case OSTREAM_SEND_ISTREAM_RESULT_FINISHED:
-                       break;
-               case OSTREAM_SEND_ISTREAM_RESULT_WAIT_INPUT:
-                       break;
-               case OSTREAM_SEND_ISTREAM_RESULT_WAIT_OUTPUT:
-                       i_unreached();
-               case OSTREAM_SEND_ISTREAM_RESULT_ERROR_INPUT:
-                       /* handle below */
-                       break;
-               case OSTREAM_SEND_ISTREAM_RESULT_ERROR_OUTPUT:
-                       if (!mail_storage_set_error_from_errno(storage)) {
-                               mail_storage_set_critical(storage,
-                                       "save: write(%s) failed: %s",
-                                       o_stream_get_name(ctx->data.output),
-                                       o_stream_get_error(ctx->data.output));
-                       }
-                       return -1;
-               }
-               if (cache_dest_mail != NULL)
-                       index_mail_cache_parse_continue(cache_dest_mail);
-
-               /* both tee input readers may consume data from our primary
-                  input stream. we'll have to make sure we don't return with
-                  one of the streams still having data in them. */
-       } while (i_stream_read(input) > 0);
-
-       if (input->stream_errno != 0) {
-               mail_storage_set_critical(storage, "save: read(%s) failed: %s",
-                       i_stream_get_name(input), i_stream_get_error(input));
-               return -1;
-       }
-       return 0;
-}
-
 void index_storage_save_abort_last(struct mail_save_context *ctx, uint32_t seq)
 {
        struct index_mail *imail = (struct index_mail *)ctx->dest_mail;
index d6bd1c2ad2c732a228a9ecd25d98a59b03b81ebd..28dc66d649a8f16f03d481aca76a94bf6abf8e25 100644 (file)
@@ -180,9 +180,6 @@ int index_storage_expunged_sync_begin(struct mailbox *box,
                                      enum mail_index_sync_flags flags);
 void index_storage_expunging_deinit(struct mailbox *box);
 
-int index_storage_save_continue(struct mail_save_context *ctx,
-                               struct istream *input,
-                               struct mail *cache_dest_mail);
 void index_storage_save_abort_last(struct mail_save_context *ctx, uint32_t seq);
 
 #endif