Optimize logfile write (#1652)

* remove no longer needed OpenFileAndWait()

* remove WriteToDedicatedFile

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
CaCO3
2022-12-21 17:45:42 +01:00
committed by GitHub
parent f6bf7e38c7
commit 0feeede406
15 changed files with 114 additions and 143 deletions

View File

@@ -30,7 +30,7 @@ char scratch[SERVER_HELPER_SCRATCH_BUFSIZE];
esp_err_t send_file(httpd_req_t *req, std::string filename)
{
FILE *fd = OpenFileAndWait(filename.c_str(), "r");
FILE *fd = fopen(filename.c_str(), "r");
if (!fd) {
ESP_LOGE(TAG, "Failed to read existing file: %s", filename.c_str());
/* Respond with 404 Error */