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 Midnight Cow

Revision:
5:fe95043a506e
Parent:
4:4bef734cc93e
--- 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));