fix tracking of sync record count through placeholder upgrades

for now, this is just pedantry, as it merely affects the size of the
already oversized { uid => srec } flathash after journal replay.

amends 70bad661.
This commit is contained in:
Oswald Buddenhagen 2022-02-04 19:28:34 +01:00
parent 69118d25ec
commit 0f6362f2e2

View File

@ -574,6 +574,7 @@ upgrade_srec( sync_vars_t *svars, sync_rec_t *srec )
srec->next = nsrec; srec->next = nsrec;
if (svars->srecadd == &srec->next) if (svars->srecadd == &srec->next)
svars->srecadd = &nsrec->next; svars->srecadd = &nsrec->next;
svars->nsrecs++;
// Move the placeholder to the new entry. // Move the placeholder to the new entry.
int t = (srec->status & S_DUMMY(F)) ? F : N; int t = (srec->status & S_DUMMY(F)) ? F : N;
nsrec->uid[t] = srec->uid[t]; nsrec->uid[t] = srec->uid[t];