diff options
author | Daniel Plasa <dplasa@gmail.com> | 2020-05-29 23:29:08 +0200 |
---|---|---|
committer | Daniel Plasa <dplasa@gmail.com> | 2020-05-29 23:29:08 +0200 |
commit | 51321af9e4e71f91ad57f8af2dc2e3975a5f1dde (patch) | |
tree | ba581c253cbf62f6b98ba3bcf95a3ab272a801e2 /FTPServer.cpp | |
parent | use esp8266::polledTimeout::oneShotMs fot the timeout handling (diff) | |
download | FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar.gz FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar.bz2 FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar.lz FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar.xz FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.tar.zst FTPCLientServer-51321af9e4e71f91ad57f8af2dc2e3975a5f1dde.zip |
Diffstat (limited to '')
-rw-r--r-- | FTPServer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FTPServer.cpp b/FTPServer.cpp index e153649..86adcdb 100644 --- a/FTPServer.cpp +++ b/FTPServer.cpp @@ -754,9 +754,9 @@ int8_t FTPServer::processCommand() millisBeginTrans = millis(); bytesTransfered = 0; uint32_t fs = file.size(); - if (allocateBuffer(fs > 32768 ? 32768 : fs)) + if (allocateBuffer(4 * TCP_MSS)) { - FTP_DEBUG_MSG("Sending file '%s'", path.c_str()); + FTP_DEBUG_MSG("Sending file '%s' (%lu bytes)", path.c_str(), fs); FTP_SEND_MSG(150, "%lu bytes to download", fs); } else @@ -801,7 +801,7 @@ int8_t FTPServer::processCommand() transferState = tStore; millisBeginTrans = millis(); bytesTransfered = 0; - if (allocateBuffer(2048)) + if (allocateBuffer(4 * TCP_MSS)) { FTP_DEBUG_MSG("Receiving file '%s' => %s", parameters.c_str(), path.c_str()); FTP_SEND_MSG(150, "Connected to port %d", dataPort); |