]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
virtual mailboxes: Fixed an assert-crash when mailbox was being opened.
authorTimo Sirainen <tss@iki.fi>
Tue, 11 Nov 2008 20:01:51 +0000 (22:01 +0200)
committerTimo Sirainen <tss@iki.fi>
Tue, 11 Nov 2008 20:01:51 +0000 (22:01 +0200)
--HG--
branch : HEAD

src/plugins/virtual/virtual-sync.c

index 17654c2a08fdb78eb9d8ff9398d1a70b841c90eb..7da9ea563748c3e45ceb73378f49496acb6212d6 100644 (file)
@@ -974,8 +974,16 @@ static void virtual_sync_backend_map_uids(struct virtual_sync_context *ctx)
                else {
                        /* exists - update uidmap and flags */
                        uidmap[j++].virtual_uid = vuid;
-                       virtual_sync_external_flags(ctx, bbox, vseq,
-                                                   vrec->real_uid);
+                       /* if ctx->retry is set, we're just opening the virtual
+                          mailbox and using a continued search using modseq.
+                          some messages in uidmap may already be expunged, so
+                          we can't go looking at the real messages yet.
+                          after retrying the sync we'll get back here and
+                          really do it. */
+                       if (!ctx->retry) {
+                               virtual_sync_external_flags(ctx, bbox, vseq,
+                                                           vrec->real_uid);
+                       }
                }
        }
        i_free(vmails);