]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3-migration: Delete unnecessary POP3 order checking code
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 25 Aug 2017 10:36:11 +0000 (13:36 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 25 Aug 2017 10:36:11 +0000 (13:36 +0300)
Nothing is actually using the result.

src/plugins/pop3-migration/pop3-migration-plugin.c

index 01806da8b7e72103a6cf7db0480e6083d6f5392b..8271f458808720aa67148018fcd235c81f0f1ef0 100644 (file)
@@ -70,7 +70,6 @@ struct pop3_migration_mailbox {
        bool cache_field_registered:1;
        bool uidl_synced:1;
        bool uidl_sync_failed:1;
-       bool uidl_ordered:1;
 };
 
 /* NOTE: these headers must be sorted */
@@ -709,12 +708,7 @@ pop3_uidl_assign_by_hdr_hash(struct mailbox *box, struct mailbox *pop3_box)
 static int pop3_migration_uidl_sync(struct mailbox *box)
 {
        struct pop3_migration_mailbox *mbox = POP3_MIGRATION_CONTEXT(box);
-       struct pop3_migration_mail_storage *mstorage =
-               POP3_MIGRATION_CONTEXT(box->storage);
        struct mailbox *pop3_box;
-       const struct pop3_uidl_map *pop3_map;
-       unsigned int i, count;
-       uint32_t prev_uid;
 
        pop3_box = pop3_mailbox_alloc(box->storage);
        /* the POP3 server isn't connected to yet. handle all IMAP traffic
@@ -735,21 +729,6 @@ static int pop3_migration_uidl_sync(struct mailbox *box)
                }
        }
 
-       /* see if the POP3 UIDL order is the same as IMAP UID order */
-       mbox->uidl_ordered = TRUE;
-       pop3_map = array_get(&mstorage->pop3_uidl_map, &count);
-       prev_uid = 0;
-       for (i = 0; i < count; i++) {
-               if (pop3_map[i].imap_uid == 0)
-                       continue;
-
-               if (prev_uid > pop3_map[i].imap_uid) {
-                       mbox->uidl_ordered = FALSE;
-                       break;
-               }
-               prev_uid = pop3_map[i].imap_uid;
-       }
-
        mbox->uidl_synced = TRUE;
        mailbox_free(&pop3_box);
        return 0;