Andrew Boyson / net

Dependents:   oldheating gps motorhome heating

Revision:
123:44fea08759af
Parent:
113:904b40231907
Child:
124:6e558721ec1c
--- a/udp/ntp/ntpserver.c	Tue Feb 12 13:15:42 2019 +0000
+++ b/udp/ntp/ntpserver.c	Thu Feb 21 12:53:06 2019 +0000
@@ -33,7 +33,7 @@
     if (!ClkTimeIsSet()           ) return 3; //Alarm condition; clock is not synchronised
     if (!ClkUtcGetNextLeapEnable()) return 0; //No warning
     
-    int64_t nowTime = ClkUtcFromTai(ClkNowTime()); //This is TAI time
+    int64_t nowTime = ClkUtcFromTai(ClkNowTai());
     int64_t liPriorNotice = LI_PRIOR_NOTICE_SECONDS << CLK_TIME_ONE_SECOND_SHIFT;
     
     if (nowTime > ClkUtcGetNextEpoch() - liPriorNotice)
@@ -60,7 +60,7 @@
 }
 static uint64_t getRefNtp()
 {
-    return ClkTimeToNtpTimeStamp(ClkRefTime());
+    return ClkTimeToNtpTimeStamp(ClkRefTai());
 }
 int NtpServerRequest(void (*traceback)(void), struct NtpHeader* pHeaderRx, struct NtpHeader* pHeaderTx)
 {