Lab2_web / Mbed 2 deprecated webserverBlinky

Dependencies:   mbed

Fork of webserverBlinky by RealTimeCompLab2

Revision:
24:9f3db3bf7f9c
Parent:
23:af88d429bed1
Child:
25:0b0450e1b08b
--- a/main.cpp	Mon Jan 02 18:22:51 2017 +0000
+++ b/main.cpp	Mon Jan 02 18:43:15 2017 +0000
@@ -258,13 +258,11 @@
         icmpSum[0]=sum>>8; icmpSum[1]=sum; // new checksum for ICMP data portion
 
         int printSize = icmpLength-8; // exclude size of icmp header
-        debug (("DS %d ", printSize));
         char * icmpData = icmpType+8; // the actual data is after the header
         if (printSize > 10) printSize = 10; // print only first 20 characters
-        for (int i=0; i<printSize; i++) { char ch = icmpData[i]; if (ch>31 && ch<127) { debug(("%c",ch)); } else { debug(("%c",'_')); }}
+        if (printSize >0) for (int i=0; i<printSize; i++) { char ch = icmpData[i]; if (ch>31 && ch<127) { debug(("%c",ch)); } else { debug(("%c",'_')); }}
         debug(("%c",'\n'));
         sendFrame(); // reply to the ping
-        dumpFrame();
     } else {
         debug(("ICMP type=%d \n", icmpType[0])); 
     }