From cbc90350533a7b98a3e7e76e390c8b17e81e82c1 Mon Sep 17 00:00:00 2001 From: Ted Hess Date: Wed, 7 Feb 2024 13:53:57 -0500 Subject: [PATCH] Enable DNS for sntp and set default to pool.ntp.org Ref: https://www.ntppool.org/ --- lib/WUI/sntp/sntp_client.c | 7 ------- lib/WUI/sntp/sntp_opts.h | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/WUI/sntp/sntp_client.c b/lib/WUI/sntp/sntp_client.c index fbd4e1cf17..33bd54c4be 100644 --- a/lib/WUI/sntp/sntp_client.c +++ b/lib/WUI/sntp/sntp_client.c @@ -2,17 +2,10 @@ #include "sntp_client.h" #include "netdev.h" -static ip_addr_t ntp_server; // testing ntp server located in Prague static uint32_t sntp_running = 0; // describes if sntp is currently running or not void sntp_client_init(void) { sntp_setoperatingmode(SNTP_OPMODE_POLL); - /* TODO: enable DNS for ntp.pool.org as default sntp server*/ - - // TMP: ip of Czech CESNET NTP server tak.cesnet.cz - if (ipaddr_aton("195.113.144.238", &ntp_server)) { - sntp_setserver(0, &ntp_server); - } sntp_init(); } diff --git a/lib/WUI/sntp/sntp_opts.h b/lib/WUI/sntp/sntp_opts.h index 74e582f33f..6a830f10a9 100644 --- a/lib/WUI/sntp/sntp_opts.h +++ b/lib/WUI/sntp/sntp_opts.h @@ -78,7 +78,8 @@ * \#define SNTP_SERVER_ADDRESS "pool.ntp.org" */ #if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ - #define SNTP_SERVER_DNS 0 + #define SNTP_SERVER_DNS 1 + #define SNTP_SERVER_ADDRESS "pool.ntp.org" #endif /**