sdbox-mail.c revision 2d01cc1880cf2afd4fb1c8ad7fa6ce78e562e71e
2e37d45867d081db150ab78dad303b9077aea24fTimo Sirainen/* Copyright (c) 2007-2011 Dovecot authors, see the included COPYING file */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenstatic void sdbox_mail_set_expunged(struct dbox_mail *mail)
0a7b04ec6441fdcf083392888b2e30844fc3e86dTimo Sirainen if (mail_index_is_expunged(_mail->transaction->view, _mail->seq)) {
0a7b04ec6441fdcf083392888b2e30844fc3e86dTimo Sirainen mail_storage_set_critical(_mail->box->storage,
0a7b04ec6441fdcf083392888b2e30844fc3e86dTimo Sirainen "dbox %s: Unexpectedly lost uid=%u",
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenstatic bool sdbox_mail_file_set(struct dbox_mail *mail)
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen struct sdbox_mailbox *mbox = (struct sdbox_mailbox *)_mail->box;
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen /* already set */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen mail->open_file = sdbox_file_init(mbox, _mail->uid);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen /* mail is being saved in this transaction */
d665e2948cb6fe8016706752a9e4940d64f4a61dTimo Sirainen /* it doesn't have input stream yet */
4ca83616715c3bd417e34ced2c1d61852513e427Timo Sirainen ret = dbox_file_open(mail->open_file, &deleted);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint sdbox_mail_open(struct dbox_mail *mail, uoff_t *offset_r,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen if (_mail->lookup_abort != MAIL_LOOKUP_ABORT_NEVER) {
2d01cc1880cf2afd4fb1c8ad7fa6ce78e562e71eTimo Sirainen _mail->transaction->stats.open_lookup_count++;