From: Timo Sirainen Date: Tue, 27 Sep 2011 15:14:32 +0000 (+0300) Subject: pop3: Fixed POP3-order sorting. X-Git-Tag: 2.1.beta1~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d93f51bbd9ec42dbb461c1318dfc4802cec81bf6;p=thirdparty%2Fdovecot%2Fcore.git pop3: Fixed POP3-order sorting. --- diff --git a/src/pop3/pop3-client.c b/src/pop3/pop3-client.c index dc2cf6ac0b..5ea989b0c8 100644 --- a/src/pop3/pop3-client.c +++ b/src/pop3/pop3-client.c @@ -118,13 +118,12 @@ msgnum_to_seq_map_add(ARRAY_TYPE(uint32_t) *msgnum_to_seq_map, if (!array_is_created(msgnum_to_seq_map)) i_array_init(msgnum_to_seq_map, client->messages_count); - else { - /* add any messages between this and the previous one that had - a POP3 order defined */ - seq = array_count(msgnum_to_seq_map) + 1; - for (; seq <= msgnum; seq++) - array_append(msgnum_to_seq_map, &seq, 1); - } + + /* add any messages between this and the previous one that had + a POP3 order defined */ + seq = array_count(msgnum_to_seq_map) + 1; + for (; seq <= msgnum; seq++) + array_append(msgnum_to_seq_map, &seq, 1); array_append(msgnum_to_seq_map, &mail->seq, 1); }