sntp: store server IP address after DNS lookup

See patch #9612

Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
Tom Ferrin 2018-03-31 19:17:03 +02:00 committed by goldsimon
parent 2d4da92eeb
commit e46b9ad4ac

View File

@ -572,6 +572,7 @@ sntp_dns_found(const char *hostname, const ip_addr_t *ipaddr, void *arg)
if (ipaddr != NULL) {
/* Address resolved, send request */
LWIP_DEBUGF(SNTP_DEBUG_STATE, ("sntp_dns_found: Server address resolved, sending request\n"));
sntp_servers[sntp_current_server].addr = *ipaddr;
sntp_send_request(ipaddr);
} else {
/* DNS resolving failed -> try another server */