dovecot-2.2: fts: Added missing error logging/setting.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Mar 12 10:33:55 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/65e55166c794
changeset: 18335:65e55166c794
user: Timo Sirainen <tss at iki.fi>
date: Thu Mar 12 12:32:54 2015 +0200
description:
fts: Added missing error logging/setting.
diffstat:
src/plugins/fts/fts-build-mail.c | 10 ++++++++--
src/plugins/fts/fts-storage.c | 8 ++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diffs (43 lines):
diff -r 072170010eac -r 65e55166c794 src/plugins/fts/fts-build-mail.c
--- a/src/plugins/fts/fts-build-mail.c Thu Mar 12 12:32:30 2015 +0200
+++ b/src/plugins/fts/fts-build-mail.c Thu Mar 12 12:32:54 2015 +0200
@@ -278,8 +278,14 @@
bool binary_body;
int ret;
- if (mail_get_stream(mail, NULL, NULL, &input) < 0)
- return mail->expunged ? 0 : -1;
+ if (mail_get_stream(mail, NULL, NULL, &input) < 0) {
+ if (mail->expunged)
+ return 0;
+ i_error("Failed to read mailbox %s mail UID=%u stream: %s",
+ mailbox_get_vname(mail->box), mail->uid,
+ mailbox_get_last_error(mail->box, NULL));
+ return -1;
+ }
memset(&ctx, 0, sizeof(ctx));
ctx.update_ctx = update_ctx;
diff -r 072170010eac -r 65e55166c794 src/plugins/fts/fts-storage.c
--- a/src/plugins/fts/fts-storage.c Thu Mar 12 12:32:30 2015 +0200
+++ b/src/plugins/fts/fts-storage.c Thu Mar 12 12:32:54 2015 +0200
@@ -598,13 +598,17 @@
struct fts_mailbox *fbox = FTS_CONTEXT(t->box);
struct mailbox *box = t->box;
bool autoindex;
- int ret;
+ int ret = 0;
autoindex = ft->mails_saved &&
mail_user_plugin_getenv(box->storage->user,
"fts_autoindex") != NULL;
- ret = fts_transaction_end(t);
+ if (fts_transaction_end(t) < 0) {
+ mail_storage_set_error(t->box->storage, MAIL_ERROR_TEMP,
+ "FTS transaction commit failed");
+ ret = -1;
+ }
if (fbox->module_ctx.super.transaction_commit(t, changes_r) < 0)
ret = -1;
if (ret < 0)
More information about the dovecot-cvs
mailing list