storing variables in single array for transmission

Dependencies:   SDFileSystem dspmodified mbed

Fork of FTPGET_Merged by Pravin Magar

Revision:
22:4141d6a13488
Parent:
21:9e71641aeac8
Child:
23:69ac079fb31e
--- a/merged_code.cpp	Thu Jun 25 05:49:34 2015 +0000
+++ b/merged_code.cpp	Thu Jun 25 06:30:44 2015 +0000
@@ -843,6 +843,15 @@
                         }
                         trialcount=allowedtrials+4;
                         wait(5);
+                        for(int ftp_close_attempt=0; ftp_close_attempt<2; ftp_close_attempt++) 
+                        {
+                            //pc.printf("\r\nftp_close\r\n");
+                            if(sendATcommand("AT+FTPPUT=2,0", "OK", 5,0)) 
+                            {
+                                ftp_close_attempt=6;
+                            }
+                        }
+                        return;
                     } else trialcount++;
                 }
             }
@@ -854,11 +863,9 @@
             {
                 ftp_close_attempt=6;
             }
-        }
-        return;
-        
+        }               
     }
-    
+    return;   
 }