Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sntp.sync work with DNS hostnames #779

Merged
merged 1 commit into from
Nov 24, 2015
Merged

Conversation

askainet
Copy link

Added a call to dns_gethostbyname to resolve the server name to an IP address:

If server is already an IP address it returns inmediately.

If it's a DNS hostname it uses the new callback function sntp_dns_found that will get the IP address and run sntp_dosend after DNS resolution is OK.

jmattsson added a commit that referenced this pull request Nov 24, 2015
Make sntp.sync work with DNS hostnames
@jmattsson jmattsson merged commit 455f0f2 into nodemcu:dev Nov 24, 2015
@jmattsson
Copy link
Member

Thanks!

@askainet askainet deleted the sntp_dns branch November 25, 2015 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants