]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fixed assert-crash caused by previous change
authorTimo Sirainen <tss@iki.fi>
Tue, 9 Apr 2013 11:17:56 +0000 (14:17 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 9 Apr 2013 11:17:56 +0000 (14:17 +0300)
src/doveadm/dsync/dsync-mailbox-import.c

index f0c90f45d4e0d4c7c49cdaf86027b0aafde9b277..f0d84302d6f6a77e247b35d98955a17e6c294e63 100644 (file)
@@ -1756,11 +1756,6 @@ void dsync_mailbox_import_changes_finish(struct dsync_mailbox_importer *importer
        while (importer->cur_mail != NULL)
                (void)dsync_mailbox_try_save(importer, NULL);
 
-       dsync_mailbox_import_assign_new_uids(importer);
-       /* save mails from local sources where possible,
-          request the rest from remote */
-       dsync_mailbox_import_handle_local_mails(importer);
-
        if (importer->search_ctx != NULL) {
                if (mailbox_search_deinit(&importer->search_ctx) < 0) {
                        i_error("Mailbox %s: Search failed: %s",
@@ -1769,6 +1764,11 @@ void dsync_mailbox_import_changes_finish(struct dsync_mailbox_importer *importer
                        importer->failed = TRUE;
                }
        }
+
+       dsync_mailbox_import_assign_new_uids(importer);
+       /* save mails from local sources where possible,
+          request the rest from remote */
+       dsync_mailbox_import_handle_local_mails(importer);
 }
 
 const struct dsync_mail_request *