Update FTPClient
Dependents: Digital_Photo_Frame_with_FTP_SD_WIZwiki-W7500 FTP_Streaming_Music_Player_WIZwiki-W7500 GIF2015 MP3Decoding_VS1002_WIZwiki-W7500
Fork of FTPClient by
Revision 5:fe95043a506e, committed 2015-08-26
- Comitter:
- MidnightCow
- Date:
- Wed Aug 26 00:36:33 2015 +0000
- Parent:
- 4:4bef734cc93e
- Commit message:
- Modify the Open funciton
;
Changed in this revision
FTPClient.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4bef734cc93e -r fe95043a506e FTPClient.cpp --- a/FTPClient.cpp Sat Aug 15 08:43:02 2015 +0000 +++ b/FTPClient.cpp Wed Aug 26 00:36:33 2015 +0000 @@ -26,19 +26,12 @@ int size; blogin = false; - #if 0 - do{ - FTPClientControlSock.connect(ip, port); - }while(!FTPClientControlSock.is_connected()); - #endif - #if 1 - while (FTPClientControlSock.connect(ip, port) < 0) { + if (FTPClientControlSock.connect(ip, port) < 0) { #ifdef DEBUG printf("Unable to connect to (%s) on port (%d)\r\n", ip, port); #endif - wait(1); + return false; } - #endif while(!blogin){ size = FTPClientControlSock.receive(ftpbuf, sizeof(ftpbuf));