isync

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

commit 16238909d3e70524bd694fb243c0d8a2deac9749
parent 6e7b3d24c18f21fd1e85d553aa5b530cbf41b75c
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Thu, 23 Dec 2021 13:48:38 +0100

print some more debug info during state reading and journal replay

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

diff --git a/src/sync_state.c b/src/sync_state.c @@ -172,6 +172,8 @@ load_state( sync_vars_t *svars ) error( "Error: unterminated sync state header in %s\n", svars->dname ); goto jbail; gothdr: + debug( " uid val %u/%u, max uid %u/%u, max expired %u\n", + svars->uidval[F], svars->uidval[N], svars->maxuid[F], svars->maxuid[N], svars->maxxfuid ); while (fgets( buf, sizeof(buf), jfp )) { line++; if (!(ll = strlen( buf )) || buf[--ll] != '\n') { @@ -318,13 +320,17 @@ load_state( sync_vars_t *svars ) } if (c == 'N') { svars->maxuid[t1] = t2; + debug( " maxuid of %s now %u\n", str_fn[t1], t2 ); } else if (c == 'F') { svars->finduid[t1] = t2; + debug( " saved UIDNEXT of %s now %u\n", str_fn[t1], t2 ); } else if (c == 'T') { *uint_array_append( &svars->trashed_msgs[t1] ) = t2; + debug( " trashed %u from %s\n", t2, str_fn[t1] ); } else if (c == '|') { svars->uidval[F] = t1; svars->uidval[N] = t2; + debug( " UIDVALIDITYs now %u/%u\n", t1, t2 ); } else if (c == '+') { srec = nfzalloc( sizeof(*srec) ); srec->uid[F] = t1;