diff --git a/src/cmnds/cmd_if.c b/src/cmnds/cmd_if.c index 2126faa5b..9f719b21c 100644 --- a/src/cmnds/cmd_if.c +++ b/src/cmnds/cmd_if.c @@ -375,6 +375,11 @@ const constant_t g_constants[] = { //cnstdetail:"descr":"Current second from NTP", //cnstdetail:"requires":""} { "$second", &getSecond }, + ////cnstdetail:{"name":"$month", + ////cnstdetail:"title":"$month", + ////cnstdetail:"descr":"Current month from NTP", + ////cnstdetail:"requires":""} + //{ "$month", &getMonth }, //cnstdetail:{"name":"$NTPOn", //cnstdetail:"title":"$NTPOn", //cnstdetail:"descr":"Returns 1 if NTP is on and already synced (so device has correct time), otherwise 0.", diff --git a/src/httpserver/http_tcp_server_nonblocking.c b/src/httpserver/http_tcp_server_nonblocking.c index 40339b7da..518e39401 100644 --- a/src/httpserver/http_tcp_server_nonblocking.c +++ b/src/httpserver/http_tcp_server_nonblocking.c @@ -173,22 +173,22 @@ void HTTPServer_RunQuickTick() { //Sleep(50); // shutdown the connection since we're done iResult = shutdown(ClientSocket, SD_SEND); - long firstAttempt = timeGetTime(); - while (1) { - iResult = recv(ClientSocket, recvbuf, recvbuflen, 0); - if (iResult == 0) - break; - err = WSAGetLastError(); - if (err != WSAEWOULDBLOCK) { - break; - } - long delta = timeGetTime() - firstAttempt; - if (delta > 2) { - printf("HTTP server would freeze to long!\n"); - break; // too long freeze! + //long firstAttempt = timeGetTime(); + //while (1) { + // iResult = recv(ClientSocket, recvbuf, recvbuflen, 0); + // if (iResult == 0) + // break; + // err = WSAGetLastError(); + // if (err != WSAEWOULDBLOCK) { + // break; + // } + // long delta = timeGetTime() - firstAttempt; + // if (delta > 2) { + // printf("HTTP server would freeze to long!\n"); + // break; // too long freeze! - } - } + // } + //} //Sleep(50); //iResult = closesocket(ClientSocket); //if (iResult == SOCKET_ERROR) {