From: Timo Sirainen Date: Fri, 25 Aug 2017 10:36:11 +0000 (+0300) Subject: pop3-migration: Delete unnecessary POP3 order checking code X-Git-Tag: 2.3.0.rc1~1146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc3661d7103bdcb4633f24ae4fd9f5d053fc0646;p=thirdparty%2Fdovecot%2Fcore.git pop3-migration: Delete unnecessary POP3 order checking code Nothing is actually using the result. --- diff --git a/src/plugins/pop3-migration/pop3-migration-plugin.c b/src/plugins/pop3-migration/pop3-migration-plugin.c index 01806da8b7..8271f45880 100644 --- a/src/plugins/pop3-migration/pop3-migration-plugin.c +++ b/src/plugins/pop3-migration/pop3-migration-plugin.c @@ -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;