diff options
author | Rainer Weikusat <rweikusat@mssgmbh.com> | 2011-01-08 12:46:28 +0100 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2016-12-11 22:06:05 +0100 |
commit | be13dfd5947f0e003cfe5b00f311de6ba69b99d7 (patch) | |
tree | 8e2e789fa1e33a1b7a278be9b26be5fca0628f49 /pop3.c | |
parent | 2169cb8535e18cedc617fd7ec5b8ab59970fcfc1 (diff) | |
download | fetchmail-be13dfd5947f0e003cfe5b00f311de6ba69b99d7.tar.gz fetchmail-be13dfd5947f0e003cfe5b00f311de6ba69b99d7.tar.bz2 fetchmail-be13dfd5947f0e003cfe5b00f311de6ba69b99d7.zip |
Fix crash on --flush.
Diffstat (limited to 'pop3.c')
-rw-r--r-- | pop3.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1115,8 +1115,11 @@ static int pop3_getrange(int sock, old_rec = uid_db_insert(&ctl->oldsaved, id, UID_UNSEEN); } - /* save the number */ - if (new_rec->status == UID_UNSEEN || !ctl->keep) { + /* + * save the number if it will be needed later on + * (messsage will either be fetched or deleted) + */ + if (new_rec->status == UID_UNSEEN || ctl->flush) { set_uid_db_num(&ctl->oldsaved, old_rec, unum); set_uid_db_num(&ctl->newsaved, new_rec, unum); } |