Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of webserverBlinky by
Diff: main.cpp
- Revision:
- 24:9f3db3bf7f9c
- Parent:
- 23:af88d429bed1
- Child:
- 25:0b0450e1b08b
diff -r af88d429bed1 -r 9f3db3bf7f9c main.cpp --- 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])); }