From f7590c10e8b148235f044e93b5c0e89a57324805 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 25 Aug 2017 13:36:11 +0300 Subject: [PATCH] pop3-migration: Delete unnecessary POP3 order checking code Nothing is actually using the result. --- .../pop3-migration/pop3-migration-plugin.c | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/plugins/pop3-migration/pop3-migration-plugin.c b/src/plugins/pop3-migration/pop3-migration-plugin.c index 288ad723d2..a3eba6f796 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 { unsigned int cache_field_registered:1; unsigned int uidl_synced:1; unsigned int uidl_sync_failed:1; - unsigned int uidl_ordered:1; }; /* NOTE: these headers must be sorted */ @@ -712,12 +711,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 @@ -738,21 +732,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; -- 2.47.3