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

sntp never retries if server doesn't respond to NTP query #115

Open
jeffgros opened this issue Oct 3, 2021 · 0 comments
Open

sntp never retries if server doesn't respond to NTP query #115

jeffgros opened this issue Oct 3, 2021 · 0 comments

Comments

@jeffgros
Copy link

jeffgros commented Oct 3, 2021

In function SNTP_run of sntp.c, the NTP query is only resent if ((ntp_retry_cnt % 0xFFF) == 0). However, as is, the code only increments ntp_retry_cnt when it is zero. This means that the NTP query is never sent more than once (retry mechanism isn't working).

A possible solution would be to move the ntp_retry_cnt increment above of the 'if((ntp_retry_cnt % 0xFFF) == 0)' block. When I tried this, the retry mechanism worked.

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

No branches or pull requests

1 participant