Mercurial > dovecot > core-2.2
changeset 20605:b7616318f4d0
dsync: Fixed empty-header-workaround
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 08 Aug 2016 16:15:26 +0300 |
parents | 8fbf1da39ddb |
children | 1745891bea9a |
files | src/doveadm/dsync/dsync-mailbox-import.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/dsync/dsync-mailbox-import.c Mon Aug 08 16:06:50 2016 +0300 +++ b/src/doveadm/dsync/dsync-mailbox-import.c Mon Aug 08 16:15:26 2016 +0300 @@ -1551,7 +1551,12 @@ *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 {