From: Timo Sirainen Date: Fri, 1 Jul 2016 08:07:47 +0000 (+0300) Subject: doveadm mailbox update: Avoid assert-crash on errors. X-Git-Tag: 2.3.0.rc1~3355 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=59849b39adb9ee2a6155bc77078503e60d4ea56b;p=thirdparty%2Fdovecot%2Fcore.git doveadm mailbox update: Avoid assert-crash on errors. --- diff --git a/src/doveadm/doveadm-mail-mailbox.c b/src/doveadm/doveadm-mail-mailbox.c index 411f37556d..a300e844b6 100644 --- a/src/doveadm/doveadm-mail-mailbox.c +++ b/src/doveadm/doveadm-mail-mailbox.c @@ -639,6 +639,7 @@ int cmd_mailbox_update_run(struct doveadm_mail_cmd_context *_ctx, struct update_cmd_context *ctx = (struct update_cmd_context *)_ctx; struct mail_namespace *ns; struct mailbox *box; + enum mail_error mail_error; int ret = 0; ns = mail_namespace_find(user->namespaces, ctx->mailbox); @@ -647,7 +648,8 @@ int cmd_mailbox_update_run(struct doveadm_mail_cmd_context *_ctx, if ((ret = mailbox_update(box, &(ctx->update))) != 0) { i_error("Cannot update %s: %s", ctx->mailbox, - mailbox_get_last_error(box, NULL)); + mailbox_get_last_error(box, &mail_error)); + doveadm_mail_failed_error(_ctx, mail_error); } mailbox_free(&box);