Skip to content

Commit

Permalink
Enable DNS for sntp and set default to pool.ntp.org
Browse files Browse the repository at this point in the history
  • Loading branch information
thess committed Feb 8, 2024
1 parent 89985d8 commit cbc9035
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 0 additions & 7 deletions lib/WUI/sntp/sntp_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
3 changes: 2 additions & 1 deletion lib/WUI/sntp/sntp_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down

0 comments on commit cbc9035

Please sign in to comment.