Zoltan Hudak / Mbed OS TFTPServerTest

Dependencies:   TFTPServer

Fork of TFTPServerTest by Jaap Vermaas

Revision:
2:228ce0f5c9c8
Parent:
1:698437bcd48d
Child:
3:77497b352c3f
diff -r 698437bcd48d -r 228ce0f5c9c8 main.cpp
--- a/main.cpp	Fri Mar 16 19:28:34 2018 +0000
+++ b/main.cpp	Fri Mar 16 19:34:42 2018 +0000
@@ -54,7 +54,6 @@
 {
     // Try to mount the filesystem. This should work without the Ethernet.
     pc.printf("Mounting the filesystem... \r\n");
-//    fflush(stdout);
 
     int err = fs.mount(&bd);
     pc.printf("%s\r\n", (err ? "Failed :(\r\n" : "OK\r\n"));
@@ -64,7 +63,6 @@
 
     // Open a file. This should work without the Ethernet, too.
     pc.printf("Opening \"/fs/test.txt\"... \r\n");
-//    fflush(stdout);
 
     FILE*   fp = fopen("/fs/test.txt", "r+");
     pc.printf("%s\r\n", (!fp ? "Failed :(\r\n" : "OK\r\n"));
@@ -73,8 +71,7 @@
     {
         // Create the test file if it doesn't exist
         pc.printf("No file found, creating a new file ...\r\n");
-//        fflush(stdout);
-        fp = fopen("/fs/test.txt", "w+");
+       fp = fopen("/fs/test.txt", "w+");
         pc.printf("%s\r\n", (!fp ? "Fail :(" : "OK"));
         if (!fp)
             error("error: %s (%d)\r\n", strerror(errno), -errno);
@@ -82,7 +79,6 @@
         for (int i = 0; i < 10; i++)
         {
             pc.printf("\rWriting numbers (%d/%d)... ", i, 10);
-//            fflush(stdout);
             err = fprintf(fp, "    %d\n", i);
             if (err < 0)
             {
@@ -94,7 +90,6 @@
         pc.printf("\rWriting numbers (%d/%d)... OK\r\n", 10, 10);
 
         pc.printf("Seeking file ...\r\n");
-//        fflush(stdout);
         err = fseek(fp, 0, SEEK_SET);
         pc.printf("%s\r\n", (err < 0 ? "Fail :(" : "OK"));
         if (err < 0)