Merge pull request #1379 from jameshilliard/fix-sntp

sntp: Don't set Leap Indicator in client messages.
This commit is contained in:
Sergey Lyubka authored and GitHub committed 2021-10-22 14:04:54 +01:00
commit 529a302e77
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -2824,7 +2824,7 @@ void mg_sntp_send(struct mg_connection *c, unsigned long utc) {
} else if (utc > s_sntmp_next) {
uint8_t buf[48] = {0};
s_sntmp_next = utc + SNTP_INTERVAL_SEC;
buf[0] = (3 << 6) | (4 << 3) | 3;
buf[0] = (0 << 6) | (4 << 3) | 3;
mg_send(c, buf, sizeof(buf));
LOG(LL_DEBUG, ("%lu ct %lu, next at %lu", c->id, utc, s_sntmp_next));
}
+1 -1
View File
@@ -52,7 +52,7 @@ void mg_sntp_send(struct mg_connection *c, unsigned long utc) {
} else if (utc > s_sntmp_next) {
uint8_t buf[48] = {0};
s_sntmp_next = utc + SNTP_INTERVAL_SEC;
buf[0] = (3 << 6) | (4 << 3) | 3;
buf[0] = (0 << 6) | (4 << 3) | 3;
mg_send(c, buf, sizeof(buf));
LOG(LL_DEBUG, ("%lu ct %lu, next at %lu", c->id, utc, s_sntmp_next));
}