From 61dfbea617a9d72890d2b32938418251877a00f5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 28 Dec 2005 19:10:12 +0000 Subject: [PATCH] "reformat" S_EXP_S setting logic for understandability. --- src/sync.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/sync.c b/src/sync.c index 9eeffd3..665d934 100644 --- a/src/sync.c +++ b/src/sync.c @@ -495,11 +495,15 @@ sync_boxes( store_t *ctx[], const char *names[], channel_conf_t *chan ) if (srec->status & S_DEAD) continue; if (srec->status & S_EXPIRED) { - if (!srec->uid[S] || ((ctx[S]->opts & OPEN_OLD) && !findmsg( ctx[S], srec->uid[S], &nsmsg, "slave" ))) + if (!srec->uid[S] || ((ctx[S]->opts & OPEN_OLD) && !findmsg( ctx[S], srec->uid[S], &nsmsg, "slave" ))) { srec->status |= S_EXP_S; - else if (minwuid > srec->uid[M]) - minwuid = srec->uid[M]; - } else if (smaxxuid < srec->uid[S] && minwuid > srec->uid[M]) + continue; + } + } else { + if (smaxxuid >= srec->uid[S]) + continue; + } + if (minwuid > srec->uid[M]) minwuid = srec->uid[M]; } debug( " min non-orphaned master uid is %d\n", minwuid );