diff options
author | Thomas White <taw@physics.org> | 2023-03-03 21:52:26 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-03-03 21:52:26 +0100 |
commit | 9d745906d6b9324d82c5fd90b9bed35678276424 (patch) | |
tree | bb0fef0ac53038acc5434243410f9793c4cfd0c2 | |
parent | e042d7ff34fdce4bb8c8c1932b7c2b306a449980 (diff) |
Un-set ntp_ok if there's an error
-rw-r--r-- | ntp_client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ntp_client.c b/ntp_client.c index cd9d5f7..b11683e 100644 --- a/ntp_client.c +++ b/ntp_client.c @@ -117,6 +117,7 @@ static void ntp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, } else { state->err = 1; + state->ok = 0; } pbuf_free(p); } @@ -151,6 +152,7 @@ static void ntp_dns_found(const char *hostname, } else { debug_print("NTP failed: DNS no address\n"); state->err = 1; + state->ok = 0; } } |