mdbox-save.c revision 5e702db5540b2303e25554dee21bbf35a4813381
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen/* Copyright (c) 2007-2010 Dovecot authors, see the included COPYING file */
c0435c854a0e7246373b9752d163095cc4fbe985Timo Sirainen struct dbox_file_append_context *cur_file_append;
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen struct dbox_map_transaction_context *map_trans;
07e4875d250e7a7157cd99132aafc773cf3cdf83Timo Sirainenmdbox_save_file_get_file(struct mailbox_transaction_context *t,
c0435c854a0e7246373b9752d163095cc4fbe985Timo Sirainen unsigned int count;
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen if (dbox_file_append_flush(mail->file_append) < 0)
07e4875d250e7a7157cd99132aafc773cf3cdf83Timo Sirainenmdbox_save_alloc(struct mailbox_transaction_context *t)
7d207b1e77a7b5e3fda640e353acfc86d261fedfTimo Sirainen struct mdbox_mailbox *mbox = (struct mdbox_mailbox *)t->box;
6ef7e31619edfaa17ed044b45861d106a86191efTimo Sirainen i_assert((t->flags & MAILBOX_TRANSACTION_FLAG_EXTERNAL) != 0);
08fb191d6148feb3ed14e2d6c625cd248dd1c1d4Timo Sirainen /* use the existing allocated structure */
c06f4017027263cf3a08becc551f5126409e2a83Timo Sirainen ctx->append_ctx = dbox_map_append_begin(mbox->storage->map, 0);
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainenint mdbox_save_begin(struct mail_save_context *_ctx, struct istream *input)
65cb456a072219fa35b55695d476b0bf51e2d735Timo Sirainen struct mdbox_save_context *ctx = (struct mdbox_save_context *)_ctx;
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen /* get the size of the mail to be saved, if possible */
} T_END;
int ret;
return ret;
&last_map_uid) < 0) {
if (first_map_uid != 0) {
unsigned int i, count;
for (i = 0; i < count; i++) {
result);
const void *data;
bool expunged;