isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 7a4a887b3c27dff3d9d219656a57ae1aed773c80
parent c1feba585a0bc80ccf9ab77e8f4e6eb981bb01f0
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Wed, 22 Dec 2021 20:13:53 +0100

sort lists of trashed messages after journal replay

the messages are trashed in mailbox (and thus UID) order, and in
practice we expect the operations to complete in order. however, if
older messages need to be trashed after a journal replay, and we get
interrupted again, the next replay would produce an unsorted array,
and thus break the binary search.

amends 2bba9b9.

Diffstat:
Msrc/sync.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/sync.c b/src/sync.c @@ -1127,6 +1127,8 @@ load_state( sync_vars_t *svars ) } } fclose( jfp ); + sort_uint_array( svars->trashed_msgs[F].array ); + sort_uint_array( svars->trashed_msgs[N].array ); } else { if (errno != ENOENT) { sys_error( "Error: cannot read journal %s", svars->jname );