From e3b838cb8db9a4cb2f1449d5535a918282e6855d Mon Sep 17 00:00:00 2001 From: Rainer Weikusat Date: Sat, 8 Jan 2011 12:46:28 +0100 Subject: [PATCH] Fix crash on --flush. --- pop3.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pop3.c b/pop3.c index bec8ab09..9c73ae9d 100644 --- a/pop3.c +++ b/pop3.c @@ -919,8 +919,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); } -- 2.43.2