aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-04-24 05:14:02 +0200
committerMatthias Andree <matthias.andree@gmx.de>2010-12-14 17:53:02 +0100
commit3718805edd205a4eb557205b0dbc476fa765d339 (patch)
tree4315e88395cb1d30056d0665901a165fe25bff21
parent771429b93137b16b0a338735488d8db15ea7ae95 (diff)
downloadfetchmail-3718805edd205a4eb557205b0dbc476fa765d339.tar.gz
fetchmail-3718805edd205a4eb557205b0dbc476fa765d339.tar.bz2
fetchmail-3718805edd205a4eb557205b0dbc476fa765d339.zip
Reduce complexity of adding UIDs in fastuidl.
-rw-r--r--pop3.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pop3.c b/pop3.c
index 04ea97bf..3def391b 100644
--- a/pop3.c
+++ b/pop3.c
@@ -812,6 +812,7 @@ static int pop3_fastuidl( int sock, struct query *ctl, unsigned int count, int
int ok;
unsigned int first_nr, last_nr, try_nr;
char id [IDLEN+1];
+ struct idlist *savep = NULL; /** pointer to cache save_str result, speeds up saves */
first_nr = 0;
last_nr = count + 1;
@@ -853,8 +854,8 @@ static int pop3_fastuidl( int sock, struct query *ctl, unsigned int count, int
last_nr = try_nr;
/* save it */
- newl = save_str(&ctl->oldsaved, id, UID_UNSEEN);
- newl->val.status.num = try_nr;
+ savep = save_str(savep ? &savep : &ctl->oldsaved, id, UID_UNSEEN);
+ savep->val.status.num = try_nr;
}
}
if (outlevel >= O_DEBUG && last_nr <= count)