dovecot: Handle missing save_init() here by returning "not suppo...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Nov 8 21:26:01 EET 2007
details: http://hg.dovecot.org/dovecot/rev/0cee1cccd14c
changeset: 6747:0cee1cccd14c
user: Timo Sirainen <tss at iki.fi>
date: Thu Nov 08 21:18:10 2007 +0200
description:
Handle missing save_init() here by returning "not supported" error.
diffstat:
1 file changed, 5 insertions(+)
src/lib-storage/mail-storage.c | 5 +++++
diffs (15 lines):
diff -r 2259ec6c009a -r 0cee1cccd14c src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c Thu Nov 08 21:17:14 2007 +0200
+++ b/src/lib-storage/mail-storage.c Thu Nov 08 21:18:10 2007 +0200
@@ -697,6 +697,11 @@ int mailbox_save_init(struct mailbox_tra
const char *from_envelope, struct istream *input,
struct mail *dest_mail, struct mail_save_context **ctx_r)
{
+ if (t->box->v.save_init == NULL) {
+ mail_storage_set_error(t->box->storage, MAIL_ERROR_NOTPOSSIBLE,
+ "Saving messages not supported");
+ return -1;
+ }
if (t->box->v.save_init(t, flags, keywords,
received_date, timezone_offset,
from_envelope, input, dest_mail, ctx_r) < 0)
More information about the dovecot-cvs
mailing list