From: Timo Sirainen Date: Mon, 24 Jun 2013 22:23:17 +0000 (+0300) Subject: doveadm deduplicate: Fixed error handling. X-Git-Tag: 2.2.4~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fad1d96662efb9121be5dd00d7a90e70a491ef29;p=thirdparty%2Fdovecot%2Fcore.git doveadm deduplicate: Fixed error handling. --- diff --git a/src/doveadm/doveadm-mail-deduplicate.c b/src/doveadm/doveadm-mail-deduplicate.c index daa76d1e24..488bdf1dd0 100644 --- a/src/doveadm/doveadm-mail-deduplicate.c +++ b/src/doveadm/doveadm-mail-deduplicate.c @@ -80,7 +80,7 @@ cmd_deduplicate_box(struct doveadm_mail_cmd_context *_ctx, while (doveadm_mail_iter_next(iter, &mail)) { if (ctx->by_msgid) { if (mail_get_first_header(mail, "Message-ID", &key) < 0) { - errstr = mailbox_get_last_error(box, &error); + errstr = mailbox_get_last_error(mail->box, &error); if (error == MAIL_ERROR_NOTFOUND) continue; i_error("Couldn't lookup Message-ID: for UID=%u: %s", @@ -90,7 +90,7 @@ cmd_deduplicate_box(struct doveadm_mail_cmd_context *_ctx, } } else { if (mail_get_special(mail, MAIL_FETCH_GUID, &key) < 0) { - errstr = mailbox_get_last_error(box, &error); + errstr = mailbox_get_last_error(mail->box, &error); if (error == MAIL_ERROR_NOTFOUND) continue; i_error("Couldn't lookup GUID: for UID=%u: %s",