From 8e50e25eec18ec529ebb5a290c7df7512b3ed826 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Thu, 23 Dec 2021 19:56:37 -0800 Subject: [PATCH] Cleanup content handler and remove request counter. --- src/mesh/http/ContentHandler.cpp | 14 -------------- src/mesh/http/ContentHandler.h | 4 ---- src/mesh/http/WebServer.cpp | 1 + 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/mesh/http/ContentHandler.cpp b/src/mesh/http/ContentHandler.cpp index 4787cf5a9..5f9ef8031 100644 --- a/src/mesh/http/ContentHandler.cpp +++ b/src/mesh/http/ContentHandler.cpp @@ -53,19 +53,6 @@ char contentTypes[][2][32] = {{".txt", "text/plain"}, {".html", "text/html"} // Our API to handle messages to and from the radio. HttpAPI webAPI; -uint32_t numberOfRequests = 0; -uint32_t timeSpeedUp = 0; - -uint32_t getTimeSpeedUp() -{ - return timeSpeedUp; -} - -void setTimeSpeedUp() -{ - timeSpeedUp = millis(); -} - void registerHandlers(HTTPServer *insecureServer, HTTPSServer *secureServer) { @@ -563,7 +550,6 @@ void handleReport(HTTPRequest *req, HTTPResponse *res) res->println("\"wifi\": {"); - res->printf("\"web_request_count\": %d,\n", numberOfRequests); res->println("\"rssi\": " + String(WiFi.RSSI()) + ","); if (radioConfig.preferences.wifi_ap_mode || isSoftAPForced()) { diff --git a/src/mesh/http/ContentHandler.h b/src/mesh/http/ContentHandler.h index 779058d6b..cc07cb833 100644 --- a/src/mesh/http/ContentHandler.h +++ b/src/mesh/http/ContentHandler.h @@ -18,10 +18,6 @@ void handleReport(HTTPRequest *req, HTTPResponse *res); void middlewareSpeedUp240(HTTPRequest *req, HTTPResponse *res, std::function next); void middlewareSpeedUp160(HTTPRequest *req, HTTPResponse *res, std::function next); -uint32_t getTimeSpeedUp(); -void setTimeSpeedUp(); - - // Interface to the PhoneAPI to access the protobufs with messages class HttpAPI : public PhoneAPI { diff --git a/src/mesh/http/WebServer.cpp b/src/mesh/http/WebServer.cpp index cca8cf6be..500af5107 100644 --- a/src/mesh/http/WebServer.cpp +++ b/src/mesh/http/WebServer.cpp @@ -63,6 +63,7 @@ static void handleWebResponse() if(secureServer) secureServer->loop(); insecureServer->loop(); + } } }