From: Timo Sirainen Date: Mon, 8 Aug 2016 13:15:26 +0000 (+0300) Subject: dsync: Fixed empty-header-workaround X-Git-Tag: 2.3.0.rc1~3215 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=94a1fedb51b3403bb879db9f3c4430ae34865e8e;p=thirdparty%2Fdovecot%2Fcore.git dsync: Fixed empty-header-workaround --- diff --git a/src/doveadm/dsync/dsync-mailbox-import.c b/src/doveadm/dsync/dsync-mailbox-import.c index c8192a8541..a458abe870 100644 --- a/src/doveadm/dsync/dsync-mailbox-import.c +++ b/src/doveadm/dsync/dsync-mailbox-import.c @@ -1549,7 +1549,12 @@ dsync_mailbox_import_match_msg(struct dsync_mailbox_importer *importer, *result_r = "Error fetching header stream"; return -1; } - if (strcmp(change->hdr_hash, hdr_hash) == 0) { + if (importer->empty_hdr_workaround && + (dsync_mail_hdr_hash_is_empty(change->hdr_hash) || + dsync_mail_hdr_hash_is_empty(hdr_hash))) { + *result_r = "Empty headers found with workaround enabled - assuming a match"; + return 1; + } else if (strcmp(change->hdr_hash, hdr_hash) == 0) { *result_r = "Headers hashes match"; return 1; } else {