1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

POP3: Ignore messages without unique-id when parsing UIDL response

Fixes issue 2731
This commit is contained in:
cketti 2010-12-01 18:14:12 +00:00
parent f5eb6e03af
commit 9f7b447181

View File

@ -596,21 +596,26 @@ public class Pop3Store extends Store
break;
}
String[] uidParts = response.split(" ");
Integer msgNum = Integer.valueOf(uidParts[0]);
String msgUid = uidParts[1];
if (unindexedUids.contains(msgUid))
{
if (K9.DEBUG && K9.DEBUG_PROTOCOL_POP3)
{
Log.d(K9.LOG_TAG, "Got msgNum " + msgNum + " for UID " + msgUid);
}
Pop3Message message = mUidToMsgMap.get(msgUid);
if (message == null)
{
message = new Pop3Message(msgUid, this);
}
indexMessage(msgNum, message);
// Ignore messages without a unique-id
if (uidParts.length >= 2)
{
Integer msgNum = Integer.valueOf(uidParts[0]);
String msgUid = uidParts[1];
if (unindexedUids.contains(msgUid))
{
if (K9.DEBUG && K9.DEBUG_PROTOCOL_POP3)
{
Log.d(K9.LOG_TAG, "Got msgNum " + msgNum + " for UID " + msgUid);
}
Pop3Message message = mUidToMsgMap.get(msgUid);
if (message == null)
{
message = new Pop3Message(msgUid, this);
}
indexMessage(msgNum, message);
}
}
}
}