Skip to content

Commit

Permalink
dsync: Fixed empty-header-workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Aug 8, 2016
1 parent 9057806 commit 94a1fed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/doveadm/dsync/dsync-mailbox-import.c
Expand Up @@ -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 {
Expand Down

0 comments on commit 94a1fed

Please sign in to comment.