mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 05:15:07 -05:00
reference: return real sync status in REF_GetReferenceParams()
If local reference is active, return normal leap, but unsynchronised status. Update the callers of the function to work with the leap directly and not change their behaviour. REF_IsLocalActive() is no longer needed.
This commit is contained in:
10
reference.c
10
reference.c
@@ -1223,7 +1223,7 @@ REF_GetReferenceParams
|
||||
|
||||
} else if (enable_local_stratum) {
|
||||
|
||||
*is_synchronised = 1;
|
||||
*is_synchronised = 0;
|
||||
|
||||
*stratum = local_stratum;
|
||||
*ref_id = NTP_REFID_LOCAL;
|
||||
@@ -1331,14 +1331,6 @@ REF_DisableLocal(void)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
int
|
||||
REF_IsLocalActive(void)
|
||||
{
|
||||
return !are_we_synchronised && enable_local_stratum;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
#define LEAP_SECOND_CLOSE 5
|
||||
|
||||
int REF_IsLeapSecondClose(void)
|
||||
|
||||
Reference in New Issue
Block a user