]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c
Fix build fail.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Wrq.c
index 872b2953c2897fa0a1b9fe469a97fb46ea8d4adb..412c472e42e6c93878477d8a32c623ce8a5eb9da 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Routines to process Wrq (upload).\r
   \r
-Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php<BR>\r
@@ -91,7 +91,7 @@ Mtftp4WrqSendBlock (
 \r
     if (EFI_ERROR (Status) || (DataLen > Instance->BlkSize)) {\r
       if (DataBuf != NULL) {\r
-        gBS->FreePool (DataBuf);\r
+        FreePool (DataBuf);\r
       }\r
 \r
       Mtftp4SendError (\r
@@ -111,7 +111,7 @@ Mtftp4WrqSendBlock (
     if (DataLen > 0) {\r
       NetbufAllocSpace (UdpPacket, DataLen, FALSE);\r
       CopyMem (Packet->Data.Data, DataBuf, DataLen);\r
-      gBS->FreePool (DataBuf);\r
+      FreePool (DataBuf);\r
     }\r
   }\r
 \r
@@ -145,7 +145,8 @@ Mtftp4WrqHandleAck (
 {\r
   UINT16                    AckNum;\r
   INTN                      Expected;\r
-\r
+  UINT64                    TotalBlock;\r
\r
   *Completed  = FALSE;\r
   AckNum      = NTOHS (Packet->Ack.Block[0]);\r
   Expected    = Mtftp4GetNextBlockNum (&Instance->Blocks);\r
@@ -165,7 +166,7 @@ Mtftp4WrqHandleAck (
   // tell the Mtftp4WrqInput to finish the transfer. This is the last\r
   // block number if the block range are empty..\r
   //\r
-  Mtftp4RemoveBlockNum (&Instance->Blocks, AckNum);\r
+  Mtftp4RemoveBlockNum (&Instance->Blocks, AckNum, *Completed,&TotalBlock);\r
 \r
   Expected = Mtftp4GetNextBlockNum (&Instance->Blocks);\r
 \r
@@ -329,15 +330,16 @@ Mtftp4WrqHandleOack (
   The input process routine for MTFTP upload.\r
 \r
   @param  UdpPacket             The received MTFTP packet.\r
-  @param  Points                The local/remote access point\r
+  @param  EndPoint              The local/remote access point\r
   @param  IoStatus              The result of the packet receiving\r
   @param  Context               Opaque parameter for the callback, which is the\r
                                 MTFTP session.\r
 **/\r
 VOID\r
+EFIAPI\r
 Mtftp4WrqInput (\r
   IN NET_BUF                *UdpPacket,\r
-  IN UDP_POINTS             *Points,\r
+  IN UDP_END_POINT          *EndPoint,\r
   IN EFI_STATUS             IoStatus,\r
   IN VOID                   *Context\r
   )\r
@@ -371,11 +373,11 @@ Mtftp4WrqInput (
   // Client send initial request to server's listening port. Server\r
   // will select a UDP port to communicate with the client.\r
   //\r
-  if (Points->RemotePort != Instance->ConnectedPort) {\r
+  if (EndPoint->RemotePort != Instance->ConnectedPort) {\r
     if (Instance->ConnectedPort != 0) {\r
       goto ON_EXIT;\r
     } else {\r
-      Instance->ConnectedPort = Points->RemotePort;\r
+      Instance->ConnectedPort = EndPoint->RemotePort;\r
     }\r
   }\r
 \r
@@ -462,7 +464,7 @@ ON_EXIT:
   // restart the receive, otherwise end the session.\r
   //\r
   if ((Packet != NULL) && (UdpPacket->BlockOpNum > 1)) {\r
-    gBS->FreePool (Packet);\r
+    FreePool (Packet);\r
   }\r
 \r
   if (UdpPacket != NULL) {\r