Browse Source

fix crash when resuming message propagation with MaxMessages

the problem is triggered by the source-side message disappearing
after a transaction to propagate it was started and then interrupted.

it seems tempting to centralize the null-check, but some of the other
branches are taken in situations where the relevant messages from the
source store have not been requested.

no autotest, as our test suite does not support injecting changes before
resuming.

amends 0089f49.
master
Oswald Buddenhagen 1 month ago
parent
commit
1e7a75095b
  1. 2
      src/sync.c

2
src/sync.c

@ -1229,6 +1229,8 @@ box_loaded( int sts, message_t *msgs, int total_msgs, int recent_msgs, void *aux
// but we may be pulling in the real ones. // but we may be pulling in the real ones.
nflags = (srec->pflags | srec->aflags[xt]) & ~srec->dflags[xt]; nflags = (srec->pflags | srec->aflags[xt]) & ~srec->dflags[xt];
} else { } else {
if (!srec->msg[xt^1])
continue;
nflags = srec->msg[xt^1]->flags; nflags = srec->msg[xt^1]->flags;
} }
} }

Loading…
Cancel
Save