]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Don't fail the sync if attribute couldn't be set.
authorTimo Sirainen <tss@iki.fi>
Wed, 10 Apr 2013 10:40:57 +0000 (13:40 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 10 Apr 2013 10:40:57 +0000 (13:40 +0300)
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.

src/doveadm/dsync/dsync-mailbox-import.c

index f0d84302d6f6a77e247b35d98955a17e6c294e63..dab5cf8ccaffff154d99bc6cdcf181f3dc2b7574 100644 (file)
@@ -350,7 +350,7 @@ int dsync_mailbox_import_attribute(struct dsync_mailbox_importer *importer,
 {
        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 @@ int dsync_mailbox_import_attribute(struct dsync_mailbox_importer *importer,
        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,