\r
if (Range->Start > Last) {\r
RemoveEntryList (&Range->Link);\r
- gBS->FreePool (Range);\r
+ FreePool (Range);\r
continue;\r
}\r
\r
\r
if (Range->Start > Range->End) {\r
RemoveEntryList (&Range->Link);\r
- gBS->FreePool (Range);\r
+ FreePool (Range);\r
}\r
\r
return EFI_SUCCESS;\r
It simply frees the packet.\r
\r
@param Packet The transmitted (or failed to) packet\r
- @param Points The local and remote UDP access point\r
+ @param EndPoint The local and remote UDP access point\r
@param IoStatus The result of the transmission\r
@param Context Opaque parameter to the callback\r
\r
**/\r
VOID\r
+EFIAPI\r
Mtftp4OnPacketSent (\r
IN NET_BUF *Packet,\r
- IN UDP_POINTS *Points,\r
+ IN UDP_END_POINT *EndPoint,\r
IN EFI_STATUS IoStatus,\r
IN VOID *Context\r
)\r
IN OUT NET_BUF *Packet\r
)\r
{\r
- UDP_POINTS UdpPoint;\r
+ UDP_END_POINT UdpPoint;\r
EFI_STATUS Status;\r
UINT16 OpCode;\r
UINT16 Value;\r
NetbufFree (Instance->LastPacket);\r
}\r
\r
- Instance->LastPacket = Packet;\r
+ Instance->LastPacket = Packet;\r
\r
- Instance->CurRetry = 0;\r
+ Instance->CurRetry = 0;\r
Mtftp4SetTimeout (Instance);\r
\r
- UdpPoint.LocalAddr = 0;\r
- UdpPoint.LocalPort = 0;\r
- UdpPoint.RemoteAddr = Instance->ServerIp;\r
+ ZeroMem (&UdpPoint, sizeof (UdpPoint));\r
+ UdpPoint.RemoteAddr.Addr[0] = Instance->ServerIp;\r
\r
//\r
// Send the requests to the listening port, other packets\r
Instance->UnicastPort,\r
Packet,\r
&UdpPoint,\r
- 0,\r
+ NULL,\r
Mtftp4OnPacketSent,\r
Instance\r
);\r
IN MTFTP4_PROTOCOL *Instance\r
)\r
{\r
- UDP_POINTS UdpPoint;\r
+ UDP_END_POINT UdpPoint;\r
EFI_STATUS Status;\r
UINT16 OpCode;\r
UINT16 Value;\r
\r
ASSERT (Instance->LastPacket != NULL);\r
\r
- UdpPoint.LocalAddr = 0;\r
- UdpPoint.LocalPort = 0;\r
- UdpPoint.RemoteAddr = Instance->ServerIp;\r
+ ZeroMem (&UdpPoint, sizeof (UdpPoint));\r
+ UdpPoint.RemoteAddr.Addr[0] = Instance->ServerIp;\r
\r
//\r
// Set the requests to the listening port, other packets to the connected port\r
Instance->UnicastPort,\r
Instance->LastPacket,\r
&UdpPoint,\r
- 0,\r
+ NULL,\r
Mtftp4OnPacketSent,\r
Instance\r
);\r