]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c
MdeModulePkg: Addressing TCP Window Retraction when window scale factor is used.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Wrq.c
index 9e91ebf124a8980aa9dda00a72fe6656c6476ca3..e8257147006bff793a58e9f3d772e26c07bb5f6f 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 - 2014, 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
@@ -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
@@ -397,6 +398,7 @@ Mtftp4WrqInput (
 \r
   } else {\r
     Packet = (EFI_MTFTP4_PACKET *) NetbufGetByte (UdpPacket, 0, NULL);\r
+    ASSERT (Packet != NULL);\r
   }\r
 \r
   Opcode = NTOHS (Packet->OpCode);\r