Fixed comments and useless function declarations

This commit is contained in:
Niklas Jensen
2026-01-18 21:43:03 +01:00
committed by Rune Harlyk
parent 17de0b22af
commit aff50d6a9c
2 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
#include <functional> #include <functional>
#include <map> #include <map>
#define PROTO_BUFFER_SIZE 2048 // Increased for chunked file transfer responses #define PROTO_BUFFER_SIZE 2048
template <typename T> template <typename T>
struct MessageTraits; struct MessageTraits;
+2 -5
View File
@@ -24,6 +24,7 @@ void FileSystemHandler::setSendCallbacks(
sendUploadCompleteCallback_ = sendUploadComplete; sendUploadCompleteCallback_ = sendUploadComplete;
} }
// This transfer is can be simplified, current "xfer" is just to distinguish a fs transfer id from any other, but relistically is just a waste of 5 bytes for every chunk sent
std::string FileSystemHandler::generateTransferId() { std::string FileSystemHandler::generateTransferId() {
return "xfer_" + std::to_string(millis()) + "_" + std::to_string(++transferIdCounter_); return "xfer_" + std::to_string(millis()) + "_" + std::to_string(++transferIdCounter_);
} }
@@ -347,10 +348,6 @@ bool FileSystemHandler::sendNextDownloadChunk(const std::string& transferId) {
return true; return true;
} }
void FileSystemHandler::processPendingDownloads() {
// Process any pending downloads (in case we want non-blocking downloads)
// Currently downloads are synchronous in handleDownloadRequest
}
// ===== STREAMING UPLOAD ===== // ===== STREAMING UPLOAD =====
@@ -467,7 +464,7 @@ void FileSystemHandler::handleUploadData(const socket_message_FSUploadData& req)
} }
} }
// Note that the finalize upload takes a insane amount of time, as it is flushing from ram to an incredibly slow LittleFS SPIFFS (Tested to roughly 12 seconds for 1 mb file) // Note that the finalize upload takes an insane amount of time, as it is flushing from ram to an incredibly slow LittleFS SPIFFS (Tested to roughly 12 seconds for 1 mb file)
void FileSystemHandler::finalizeUpload(const std::string& transferId, bool success, const std::string& error) { void FileSystemHandler::finalizeUpload(const std::string& transferId, bool success, const std::string& error) {
auto it = uploads_.find(transferId); auto it = uploads_.find(transferId);
if (it == uploads_.end()) { if (it == uploads_.end()) {