rewrite condition for readability and consistency
This commit is contained in:
parent
b10fd0c21c
commit
080740f867
|
@ -1297,11 +1297,14 @@ box_loaded( int sts, void *aux )
|
||||||
* expired message are not counted. */
|
* expired message are not counted. */
|
||||||
todel = svars->ctx[S]->count + svars->new_total[S] - svars->chan->max_messages;
|
todel = svars->ctx[S]->count + svars->new_total[S] - svars->chan->max_messages;
|
||||||
debug( "scheduling %d excess messages for expiration\n", todel );
|
debug( "scheduling %d excess messages for expiration\n", todel );
|
||||||
for (tmsg = svars->ctx[S]->msgs; tmsg && todel > 0; tmsg = tmsg->next)
|
for (tmsg = svars->ctx[S]->msgs; tmsg && todel > 0; tmsg = tmsg->next) {
|
||||||
if (!(tmsg->status & M_DEAD) && (srec = tmsg->srec) &&
|
if (tmsg->status & M_DEAD)
|
||||||
|
continue;
|
||||||
|
if ((srec = tmsg->srec) &&
|
||||||
((tmsg->flags | srec->aflags[S]) & ~srec->dflags[S] & F_DELETED) &&
|
((tmsg->flags | srec->aflags[S]) & ~srec->dflags[S] & F_DELETED) &&
|
||||||
!(srec->status & (S_EXPIRE|S_EXPIRED)))
|
!(srec->status & (S_EXPIRE|S_EXPIRED)))
|
||||||
todel--;
|
todel--;
|
||||||
|
}
|
||||||
debug( "%d non-deleted excess messages\n", todel );
|
debug( "%d non-deleted excess messages\n", todel );
|
||||||
for (tmsg = svars->ctx[S]->msgs; tmsg; tmsg = tmsg->next) {
|
for (tmsg = svars->ctx[S]->msgs; tmsg; tmsg = tmsg->next) {
|
||||||
if (tmsg->status & M_DEAD)
|
if (tmsg->status & M_DEAD)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user