From: Miroslav Lichvar Date: Thu, 23 Oct 2014 11:11:59 +0000 (+0200) Subject: ntp: take auto_offline sources offline before sending new request X-Git-Tag: 2.0-pre1~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccaf0874e1d7139919aa9692b18ca70bba044ebb;p=thirdparty%2Fchrony.git ntp: take auto_offline sources offline before sending new request --- diff --git a/ntp_core.c b/ntp_core.c index cdc32dfc..833ade6f 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -847,6 +847,10 @@ transmit_timeout(void *arg) break; } + /* With auto_offline take the source offline on 2nd missed reply */ + if (inst->auto_offline && inst->tx_count >= 2) + NCR_TakeSourceOffline(inst); + if (inst->opmode == MD_OFFLINE) { return; } @@ -908,10 +912,6 @@ transmit_timeout(void *arg) } SRC_UpdateReachability(inst->source, 0); - - if (inst->auto_offline && inst->tx_count >= 3) { - NCR_TakeSourceOffline(inst); - } } switch (inst->opmode) {