]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
BaseTools:Change the path of the file that Binary Cache
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Impl.c
index 03903640b8b61eaf29a53c3ea7381ab44c342586..70bd693e4e3a6f172a543421a850e10cf5bebd1d 100644 (file)
@@ -3,13 +3,7 @@
 \r
 (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
 Copyright (c) 2006 - 2018, 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
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -80,6 +74,9 @@ Mtftp4CleanOperation (
   Instance->Operation     = 0;\r
 \r
   Instance->BlkSize       = MTFTP4_DEFAULT_BLKSIZE;\r
+  Instance->WindowSize    = 1;\r
+  Instance->TotalBlock    = 0;\r
+  Instance->AckedBlock    = 0;\r
   Instance->LastBlock     = 0;\r
   Instance->ServerIp      = 0;\r
   Instance->ListeningPort = 0;\r
@@ -308,7 +305,7 @@ Mtftp4ConfigUnicastPort (
   UdpConfig.UseDefaultAddress  = Config->UseDefaultSetting;\r
   IP4_COPY_ADDRESS (&UdpConfig.StationAddress, &Config->StationIp);\r
   IP4_COPY_ADDRESS (&UdpConfig.SubnetMask, &Config->SubnetMask);\r
-  UdpConfig.StationPort        = 0;\r
+  UdpConfig.StationPort        = Config->LocalPort;\r
   UdpConfig.RemotePort         = 0;\r
 \r
   Ip = HTONL (Instance->ServerIp);\r
@@ -428,6 +425,7 @@ Mtftp4Start (
                Token->OptionList,\r
                Token->OptionCount,\r
                TRUE,\r
+               Instance->Operation,\r
                &Instance->RequestOption\r
                );\r
 \r
@@ -443,6 +441,7 @@ Mtftp4Start (
   Config                  = &Instance->Config;\r
   Instance->Token         = Token;\r
   Instance->BlkSize       = MTFTP4_DEFAULT_BLKSIZE;\r
+  Instance->WindowSize    = MTFTP4_DEFAULT_WINDOWSIZE;\r
 \r
   CopyMem (&Instance->ServerIp, &Config->ServerIp, sizeof (IP4_ADDR));\r
   Instance->ServerIp      = NTOHL (Instance->ServerIp);\r