isync

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

commit 5c2ce59217c6f035840378e98b40607a0f0fa032
parent 7c466fc3e7d0c11577c0bf471e6e40ff5c16e192
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Thu, 30 Mar 2017 19:48:08 +0200

fix sync resumption with re-newed messages

the UID of the entries needs to be bumped from -1 to -2, as otherwise
the resumed run would see a TUID in a sync entry which may not have one.

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

diff --git a/src/sync.c b/src/sync.c @@ -1615,6 +1615,11 @@ box_loaded( int sts, void *aux ) jFprintf( svars, "* %d %d %u\n", srec->uid[M], srec->uid[S], srec->flags ); debug( " -> updated flags to %u\n", tmsg->flags ); } + if (srec->uid[t] == -1) { + debug( " -> not too big any more\n" ); + jFprintf( svars, "%c %d %d -2\n", "<>"[t], srec->uid[M], srec->uid[S] ); + srec->uid[t] = -2; + } for (t1 = 0; t1 < TUIDL; t1++) { t2 = arc4_getbyte() & 0x3f; srec->tuid[t1] = t2 < 26 ? t2 + 'A' : t2 < 52 ? t2 + 'a' - 26 : t2 < 62 ? t2 + '0' - 52 : t2 == 62 ? '+' : '/';