mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
Fix uninitialized filename (#1838)
* fix the uninitialized filename. It only got used for the logging in case the file exists but failed to get loaded (eg. /sdcard/log/data/data_2023-01-14.csv) * . Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
@@ -41,7 +41,7 @@ esp_err_t send_file(httpd_req_t *req, std::string filename)
|
||||
{
|
||||
FILE *fd = fopen(filename.c_str(), "r");
|
||||
if (!fd) {
|
||||
ESP_LOGE(TAG, "Failed to read existing file: %s", filename.c_str());
|
||||
ESP_LOGE(TAG, "Failed to read file: %s", filename.c_str());
|
||||
/* Respond with 404 Error */
|
||||
httpd_resp_send_err(req, HTTPD_404_NOT_FOUND, get404());
|
||||
return ESP_FAIL;
|
||||
|
||||
Reference in New Issue
Block a user