diff --git a/src/httpserver/new_http.c b/src/httpserver/new_http.c index e8c8b5c6f..057e6b61b 100644 --- a/src/httpserver/new_http.c +++ b/src/httpserver/new_http.c @@ -604,6 +604,7 @@ int HTTP_ProcessPacket(http_request_t* request) { ADDLOGF_ERROR("You gave request with NULL input"); return 0; } + request->method = -1; recvbuf = request->received; for (i = 0; i < sizeof(methodNames) / sizeof(*methodNames); i++) { if (http_startsWith(recvbuf, methodNames[i])) { diff --git a/src/logging/logging.c b/src/logging/logging.c index 5db812f81..7516c3379 100644 --- a/src/logging/logging.c +++ b/src/logging/logging.c @@ -426,6 +426,10 @@ static int getData(char* buff, int buffsize, int* tail) { if (!initialised) return 0; taken = xSemaphoreTake(logMemory.mutex, 100); + if (taken == 0) + { + return 0; + } count = 0; p = buff;