mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-17 02:07:48 -04:00
pass payload length when calling UDP callback (#30)
* pass payload length when calling UDP callback
This commit is contained in:
parent
12d580e93d
commit
c40a6da2e4
1 changed files with 2 additions and 1 deletions
|
@ -280,7 +280,8 @@ UDPPacket_t *pxUDPPacket = (UDPPacket_t *) pxNetworkBuffer->pucEthernetBuffer;
|
|||
destinationAddress.sin_port = usPort;
|
||||
destinationAddress.sin_addr = pxUDPPacket->xIPHeader.ulDestinationIPAddress;
|
||||
|
||||
if( xHandler( ( Socket_t ) pxSocket, ( void* ) pcData, ( size_t ) pxNetworkBuffer->xDataLength,
|
||||
/* The value of 'xDataLength' was proven to be at least the size of a UDP packet in prvProcessIPPacket(). */
|
||||
if( xHandler( ( Socket_t ) pxSocket, ( void* ) pcData, ( size_t ) ( pxNetworkBuffer->xDataLength - ipUDP_PAYLOAD_OFFSET_IPv4 ),
|
||||
&xSourceAddress, &destinationAddress ) )
|
||||
{
|
||||
xReturn = pdFAIL; /* FAIL means that we did not consume or release the buffer */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue