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:
Miroslav Lichvar
2016-04-08 16:10:02 +02:00
parent 10719d6d35
commit 2aab6a85a4
4 changed files with 11 additions and 24 deletions

View File

@@ -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)