ntoh
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <networkAbstractionLayer_impl.h>
|
||||
#include <logger.h>
|
||||
@ -138,7 +139,7 @@ void networkSntpEngine(void *handle) {
|
||||
srcAddr[0], srcAddr[1], srcAddr[2], srcAddr[3],
|
||||
srcPort);
|
||||
coloredMsg(LOG_BLUE, "nes, received in the %d. cycles", localHandle->retryCount);
|
||||
localHandle->seconds = ((localHandle->ntpMsg.xmt >> 32) & 0x0ffffffff) - UNIX_NTP_EPOCH_DIFF;
|
||||
localHandle->seconds = ntohl((localHandle->ntpMsg.xmt >> 32) & 0x0ffffffff) - UNIX_NTP_EPOCH_DIFF;
|
||||
coloredMsg(LOG_BLUE, "nes, seconds: %lu", localHandle->seconds);
|
||||
localHandle->sntpState = SNTP_STATE_DONE;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user