From: Miroslav Lichvar Date: Tue, 24 Mar 2015 17:04:09 +0000 (+0100) Subject: reference: update leap status right after leap second X-Git-Tag: 2.0-pre2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb21841659d4801b7d37786700ec491d1dd7e8de;p=thirdparty%2Fchrony.git reference: update leap status right after leap second Don't wait for the next update, there may not be any before the end of the day. --- diff --git a/reference.c b/reference.c index 4cb49d09..86208e56 100644 --- a/reference.c +++ b/reference.c @@ -683,6 +683,14 @@ leap_end_timeout(void *arg) { leap_timer_running = 0; leap_in_progress = 0; + our_leap_sec = 0; + + if (leap_mode == REF_LeapModeSystem) + LCL_SetSystemLeap(0); + + if (our_leap_status == LEAP_InsertSecond || + our_leap_status == LEAP_DeleteSecond) + our_leap_status = LEAP_Normal; } /* ================================================== */