comparison src/lib-storage/index/mbox/mbox-save.c @ 6302:a8d5d826318b HEAD

Call mail_alloc/mail_free, not index_mail_alloc/index_mail/free directly.
author Timo Sirainen <tss@iki.fi>
date Thu, 16 Aug 2007 17:35:45 +0300
parents 5f66277bbe40
children 83357f65cca4
comparison
equal deleted inserted replaced
6301:8bca8efebfcf 6302:a8d5d826318b
448 ctx->next_uid++; 448 ctx->next_uid++;
449 449
450 /* parse and cache the mail headers as we read it */ 450 /* parse and cache the mail headers as we read it */
451 if (dest_mail == NULL) { 451 if (dest_mail == NULL) {
452 if (ctx->mail == NULL) 452 if (ctx->mail == NULL)
453 ctx->mail = index_mail_alloc(_t, 0, NULL); 453 ctx->mail = mail_alloc(_t, 0, NULL);
454 dest_mail = ctx->mail; 454 dest_mail = ctx->mail;
455 } 455 }
456 mail_set_seq(dest_mail, ctx->seq); 456 mail_set_seq(dest_mail, ctx->seq);
457 } 457 }
458 mbox_save_append_flag_headers(ctx->headers, save_flags); 458 mbox_save_append_flag_headers(ctx->headers, save_flags);
641 i_assert(ctx->body_output == NULL); 641 i_assert(ctx->body_output == NULL);
642 642
643 if (ctx->output != NULL) 643 if (ctx->output != NULL)
644 o_stream_destroy(&ctx->output); 644 o_stream_destroy(&ctx->output);
645 if (ctx->mail != NULL) 645 if (ctx->mail != NULL)
646 index_mail_free(ctx->mail); 646 mail_free(&ctx->mail);
647 str_free(&ctx->headers); 647 str_free(&ctx->headers);
648 i_free(ctx); 648 i_free(ctx);
649 } 649 }
650 650
651 int mbox_transaction_save_commit(struct mbox_save_context *ctx) 651 int mbox_transaction_save_commit(struct mbox_save_context *ctx)