aboutsummaryrefslogtreecommitdiffstats
path: root/pop3.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-04-24 04:06:25 +0200
committerMatthias Andree <matthias.andree@gmx.de>2010-12-14 17:53:02 +0100
commit771429b93137b16b0a338735488d8db15ea7ae95 (patch)
tree01b8ba127ba70585e6721501c078af01cf2fd2d9 /pop3.c
parent738dcc102db67a741893e2979c034df9904e2925 (diff)
downloadfetchmail-771429b93137b16b0a338735488d8db15ea7ae95.tar.gz
fetchmail-771429b93137b16b0a338735488d8db15ea7ae95.tar.bz2
fetchmail-771429b93137b16b0a338735488d8db15ea7ae95.zip
Reduce complexity for parsing UIDL response to linear.
Diffstat (limited to 'pop3.c')
-rw-r--r--pop3.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pop3.c b/pop3.c
index 3e62d864..04ea97bf 100644
--- a/pop3.c
+++ b/pop3.c
@@ -1054,6 +1054,7 @@ static int pop3_getrange(int sock,
{
/* UIDL worked - parse reply */
unsigned long unum;
+ struct idlist *newl = NULL;
*newp = 0;
while (gen_recv(sock, buf, sizeof(buf)) == PS_SUCCESS)
@@ -1063,9 +1064,9 @@ static int pop3_getrange(int sock,
if (parseuid(buf, &unum, id, sizeof(id)) == PS_SUCCESS)
{
- struct idlist *old, *newl;
+ struct idlist *old;
- newl = save_str(&ctl->newsaved, id, UID_UNSEEN);
+ newl = save_str(newl ? &newl : &ctl->newsaved, id, UID_UNSEEN);
newl->val.status.num = unum;
if ((old = str_in_list(&ctl->oldsaved, id, FALSE)))