]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm deduplicate: Fixed error handling.
authorTimo Sirainen <tss@iki.fi>
Mon, 24 Jun 2013 22:23:17 +0000 (01:23 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 24 Jun 2013 22:23:17 +0000 (01:23 +0300)
src/doveadm/doveadm-mail-deduplicate.c

index daa76d1e2473e2798d152510f955ea98e65c4fa7..488bdf1dd035346b60e44e3f24a4bbb6d42e65e7 100644 (file)
@@ -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",