From 7154b0abc33207e85c2e82e647c761b82dc4e1ce Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Sun, 28 Feb 2021 12:40:38 +0100 Subject: [PATCH] changes --- cube/User/Src/networkAbstractionLayer_lan.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cube/User/Src/networkAbstractionLayer_lan.c b/cube/User/Src/networkAbstractionLayer_lan.c index e30aca2..d82ddd6 100644 --- a/cube/User/Src/networkAbstractionLayer_lan.c +++ b/cube/User/Src/networkAbstractionLayer_lan.c @@ -14,13 +14,11 @@ static t_configBlock *config; static uint8_t sntpBuffer[MAX_SNTP_BUF_SIZE]; -const uint64_t UNIX_NTP_EPOCH_DIFF = 2208988800; +static const uint64_t UNIX_NTP_EPOCH_DIFF = 2208988800; extern const uint8_t SNTP_SOCK; +static uint64_t seconds; - -uint64_t networkSntpQuery() { - uint64_t seconds = 0; - +void networkSntpEngine(void *handle) { if (isNetworkAvailable()) { coloredMsg(LOG_BLUE, "wizsq, about to call SNTP"); @@ -48,10 +46,12 @@ uint64_t networkSntpQuery() { coloredMsg(LOG_BLUE, "wizsq, error when querying ntp server name"); } } - - return seconds; } +uint64_t networkSntpQuery() { + networkSntpEngine(NULL); + return seconds; +} extern uint8_t SINK_SOCK;