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: PPP-Blinky/ppp-blinky.cpp
- Revision:
- 168:c77eb908042a
- Parent:
- 167:ff8a2d8beeb1
- Child:
- 169:ee90aed3a735
diff -r ff8a2d8beeb1 -r c77eb908042a PPP-Blinky/ppp-blinky.cpp --- a/PPP-Blinky/ppp-blinky.cpp Mon Sep 04 04:13:15 2017 +0000 +++ b/PPP-Blinky/ppp-blinky.cpp Mon Sep 04 04:27:33 2017 +0000 @@ -598,9 +598,8 @@ swapIpPorts(); // swap IP source and destination ports if (echoFound) { memcpy(ppp.udp->data,"Got{",4); // in the UDP data modify "echo" to "Got:" - char endString[] = "} UDP Server: PPP-Blinky\n"; // an appendix - memcpy(ppp.udp->data+udpLength.data,endString,sizeof(endString)-1); // add endstring size to the UDP message - udpLength.all = udpLength.data + sizeof(endString)-1; // update udp data size with the size of the appendix + int n = sprintf(ppp.udp->data+udpLength.data, "} UDP Server: PPP-Blinky\n"); // an appendix + udpLength.data = udpLength.data + n; // update udp data size with the size of the appendix } if (testFound) { char udpResponse[50];