Mercurial > dovecot > core-2.2
changeset 12912:e0f13d7510ef
dsync: Fixed handling expunges of last message when it didn't have a known GUID.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 26 Mar 2011 00:40:58 +0200 |
parents | e5547c86528f |
children | 0d437e2e6949 |
files | src/dsync/dsync-worker-local.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dsync/dsync-worker-local.c Sat Mar 26 00:39:40 2011 +0200 +++ b/src/dsync/dsync-worker-local.c Sat Mar 26 00:40:58 2011 +0200 @@ -925,6 +925,7 @@ { struct mailbox *box = iter->mail->box; struct mailbox_status status; + const uint8_t *guid_128; const struct mailbox_expunge_rec *expunges; unsigned int count; @@ -935,9 +936,11 @@ memset(msg_r, 0, sizeof(*msg_r)); str_truncate(iter->tmp_guid_str, 0); - binary_to_hex_append(iter->tmp_guid_str, - expunges[iter->expunge_idx].guid_128, - MAIL_GUID_128_SIZE); + guid_128 = expunges[iter->expunge_idx].guid_128; + if (!mail_guid_128_is_empty(guid_128)) { + binary_to_hex_append(iter->tmp_guid_str, guid_128, + MAIL_GUID_128_SIZE); + } msg_r->guid = str_c(iter->tmp_guid_str); msg_r->uid = expunges[iter->expunge_idx].uid; msg_r->flags = DSYNC_MAIL_FLAG_EXPUNGED;