Update FTPClient

Fork of FTPClient by Ricky Kwon

Revision:
5:f748d78bba4e
Parent:
4:4bef734cc93e
--- a/FTPClient.cpp	Sat Aug 15 08:43:02 2015 +0000
+++ b/FTPClient.cpp	Wed Aug 26 13:42:01 2015 +0000
@@ -26,19 +26,14 @@
     
     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));