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