Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit 59f7884

Browse files
authored
v1.1.0 to fix incomplete download bug
### Releases v1.1.0 1. Fix bug incomplete downloads from server to client. Check [Incomplete downloads from server to client. #2](#2)
1 parent f0ebeda commit 59f7884

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/FTP_Server_Teensy41_Impl.h

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,6 @@ bool FtpServer::openDir( FTP_DIR * pdir )
936936

937937
////////////////////////////////////////////////////////////////////////////
938938

939-
#if 1
940-
941939
bool FtpServer::doRetrieve()
942940
{
943941
if ( ! dataConnected())
@@ -974,33 +972,6 @@ bool FtpServer::doRetrieve()
974972
return false;
975973
}
976974

977-
#else
978-
979-
bool FtpServer::doRetrieve()
980-
{
981-
if ( ! dataConnected())
982-
{
983-
file.close();
984-
985-
return false;
986-
}
987-
988-
int16_t nb = file.read( buf, FTP_BUF_SIZE );
989-
990-
if ( nb > 0 )
991-
{
992-
data.write( buf, nb );
993-
bytesTransfered += nb;
994-
return true;
995-
}
996-
997-
closeTransfer();
998-
999-
return false;
1000-
}
1001-
1002-
#endif
1003-
1004975
////////////////////////////////////////////////////////////////////////////
1005976

1006977
bool FtpServer::doStore()

0 commit comments

Comments
 (0)