We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5819e17 commit 051d257Copy full SHA for 051d257
subsys/net/lib/config/init_clock_sntp.c
@@ -36,6 +36,10 @@ static int sntp_init_helper(struct sntp_time *tm)
36
return sntp_simple_addr((struct sockaddr *)&sntp_addr, sizeof(sntp_addr),
37
CONFIG_NET_CONFIG_SNTP_INIT_TIMEOUT, tm);
38
}
39
+ if (sizeof(CONFIG_NET_CONFIG_SNTP_INIT_SERVER) == 1) {
40
+ /* Empty address, skip using SNTP via Kconfig defaults */
41
+ return -EINVAL;
42
+ }
43
LOG_INF("SNTP address not set by DHCPv4, using Kconfig defaults");
44
#endif /* NET_CONFIG_SNTP_INIT_SERVER_USE_DHCPV4_OPTION */
45
return sntp_simple(CONFIG_NET_CONFIG_SNTP_INIT_SERVER,
0 commit comments