A GPS disciplined clock

Dependencies:   net lpc1768 crypto clock web log

Revision:
42:f14cb9b5a42f
Parent:
41:30c9ee0ea16b
Child:
45:3b70941589af
--- a/settings/settings.c	Mon Mar 11 10:06:39 2019 +0000
+++ b/settings/settings.c	Mon Mar 11 16:47:04 2019 +0000
@@ -9,6 +9,7 @@
 #include        "net.h"
 #include       "link.h"
 #include        "dns.h"
+#include   "dnslabel.h"
 #include    "dnsname.h"
 #include   "dnsquery.h"
 #include   "dnsreply.h"
@@ -137,9 +138,8 @@
 void SetClockMaxOffsetSecs    (int  value) { ClkGovSlewOffsetMaxSecs = value; }
 
 //NTP settings
-static void lblcpy(char* dst, char* src) { strncpy(dst, src, DNS_MAX_LABEL_LENGTH); dst[DNS_MAX_LABEL_LENGTH] = 0; }
 
-void SetNtpClientServerName      ( char* value) { lblcpy(NtpClientQueryServerName,   value); }
+void SetNtpClientServerName      ( char* value) { DnsLabelCopy(NtpClientQueryServerName,   value); }
 void SetNtpClientInitialInterval ( int   value) { NtpClientQueryInitialInterval    = value ; }
 void SetNtpClientNormalInterval  ( int   value) { NtpClientQueryNormalInterval     = value ; }
 void SetNtpClientRetryInterval   ( int   value) { NtpClientQueryRetryInterval      = value ; }