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.
Dependents: oldheating gps motorhome heating
Revision 196:0876a7609a60, committed 2021-04-23
- Comitter:
- andrewboyson
- Date:
- Fri Apr 23 10:33:21 2021 +0000
- Parent:
- 195:bd5b123143ca
- Child:
- 197:465f5f2154b7
- Commit message:
- Corrected error where UserPollForData function pointer was not checked for NULL before being used. It was causing the program to crash when not used.
Changed in this revision
| udp/udp.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/udp/udp.c Sun Apr 18 19:04:48 2021 +0000
+++ b/udp/udp.c Fri Apr 23 10:33:21 2021 +0000
@@ -190,13 +190,16 @@
dstPort = TFTP_SERVER_PORT;
}
}
- if (!action)
+ if (UserPollForUdpPacketToSend)
{
- action = UserPollForUdpPacketToSend(type, pDataLength, pData);
- if (action)
+ if (!action)
{
- srcPort = UserUdpDstPort;
- dstPort = UserUdpSrcPort;
+ action = UserPollForUdpPacketToSend(type, pDataLength, pData);
+ if (action)
+ {
+ srcPort = UserUdpDstPort;
+ dstPort = UserUdpSrcPort;
+ }
}
}