dovecot-2.0: dbox: Don't assert-crash if trying to read a mail t...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Mar 8 19:39:46 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/42e5d937555e
changeset: 10865:42e5d937555e
user: Timo Sirainen <tss at iki.fi>
date: Mon Mar 08 19:39:43 2010 +0200
description:
dbox: Don't assert-crash if trying to read a mail that's being saved.
diffstat:
src/lib-storage/index/dbox-single/sdbox-mail.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (23 lines):
diff -r d05561b0c257 -r 42e5d937555e src/lib-storage/index/dbox-single/sdbox-mail.c
--- a/src/lib-storage/index/dbox-single/sdbox-mail.c Mon Mar 08 19:11:12 2010 +0200
+++ b/src/lib-storage/index/dbox-single/sdbox-mail.c Mon Mar 08 19:39:43 2010 +0200
@@ -32,6 +32,8 @@
{
struct mail *_mail = &mail->imail.mail.mail;
struct sdbox_mailbox *mbox = (struct sdbox_mailbox *)_mail->box;
+ bool deleted;
+ int ret;
if (mail->open_file != NULL) {
/* already set */
@@ -45,6 +47,10 @@
sdbox_save_file_get_file(_mail->transaction,
_mail->seq);
mail->open_file->refcount++;
+
+ /* it doesn't have input stream yet */
+ ret = dbox_file_open(mail->open_file, &deleted);
+ i_assert(ret > 0);
return TRUE;
}
}
More information about the dovecot-cvs
mailing list