1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04: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; break;
} }
String[] uidParts = response.split(" "); 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); // Ignore messages without a unique-id
if (message == null) if (uidParts.length >= 2)
{ {
message = new Pop3Message(msgUid, this); Integer msgNum = Integer.valueOf(uidParts[0]);
} String msgUid = uidParts[1];
indexMessage(msgNum, message); 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);
}
} }
} }
} }