Mercurial > dovecot > core-2.2
changeset 16259:8da591260f7c
dsync: Don't fail the sync if attribute couldn't be set.
It's probably a system configuration mismatch where some/all attributes
don't work in one system but do on another. This might or might not be a
problem, so it deserves an error message, but probably doesn't deserve
failing entirely.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 10 Apr 2013 13:40:57 +0300 |
parents | f39664bd4b29 |
children | 52233547b371 |
files | src/doveadm/dsync/dsync-mailbox-import.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/dsync/dsync-mailbox-import.c Wed Apr 10 00:14:09 2013 +0300 +++ b/src/doveadm/dsync/dsync-mailbox-import.c Wed Apr 10 13:40:57 2013 +0300 @@ -350,7 +350,7 @@ { struct dsync_mailbox_attribute *local_attr; struct mail_attribute_value value; - int ret, cmp; + int cmp; bool ignore = FALSE; i_assert(DSYNC_ATTR_HAS_VALUE(attr) || attr->deleted); @@ -416,17 +416,17 @@ value.value = attr->value; value.value_stream = attr->value_stream; value.last_change = attr->last_change; - ret = mailbox_attribute_set(importer->trans, attr->type, - attr->key, &value); - if (ret < 0) { + if (mailbox_attribute_set(importer->trans, attr->type, + attr->key, &value) < 0) { i_error("Mailbox %s: Failed to set attribute %s: %s", mailbox_get_vname(importer->box), attr->key, mailbox_get_last_error(importer->box, NULL)); - importer->failed = TRUE; + /* the attributes aren't vital, don't fail everything just + because of them. */ } if (local_attr != NULL && local_attr->value_stream != NULL) i_stream_unref(&local_attr->value_stream); - return ret; + return 0; } static void dsync_mail_error(struct dsync_mailbox_importer *importer,