verzweifelter Versuch es zu reparieren, back to master
This commit is contained in:
@ -66,5 +66,5 @@ void networkInit() {
|
||||
networkImplInit();
|
||||
|
||||
config = getConfig();
|
||||
schAdd(networkSecondsHandler, NULL, 1000000, 1000);
|
||||
schAdd(networkSecondsHandler, NULL, 0, 1000);
|
||||
}
|
||||
|
@ -45,6 +45,8 @@ enum {
|
||||
} sntpState = SNTP_STATE_IDLE;
|
||||
uint64_t seconds;
|
||||
|
||||
|
||||
/*
|
||||
static void networkSntpEngine(void *handle) {
|
||||
static uint16_t retryCount = 0;
|
||||
|
||||
@ -58,7 +60,6 @@ static void networkSntpEngine(void *handle) {
|
||||
coloredMsg(LOG_BLUE, "nes, failed to resolve ntp server");
|
||||
sntpState = SNTP_STATE_ERROR;
|
||||
} else {
|
||||
/*
|
||||
socket(SNTP_SOCK, Sn_MR_UDP, NTP_PORT, 0);
|
||||
retryCount = 0;
|
||||
uint8_t sockState = getSn_SR(SNTP_SOCK);
|
||||
@ -74,7 +75,6 @@ static void networkSntpEngine(void *handle) {
|
||||
coloredMsg(LOG_BLUE, "nes, socket in unexpected state: %d", sockState);
|
||||
sntpState = SNTP_STATE_ERROR;
|
||||
}
|
||||
*/
|
||||
}
|
||||
break;
|
||||
case SNTP_STATE_RECV:
|
||||
@ -112,8 +112,11 @@ static void networkSntpEngine(void *handle) {
|
||||
coloredMsg(LOG_BLUE, "nes, unexpected state");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
uint64_t networkSntpQuery() {
|
||||
/*
|
||||
uint64_t res = 0;
|
||||
if (sntpState == SNTP_STATE_IDLE) {
|
||||
sntpState = SNTP_STATE_START;
|
||||
@ -125,6 +128,8 @@ uint64_t networkSntpQuery() {
|
||||
res = seconds;
|
||||
}
|
||||
return res;
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user