]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Mtftp6Dxe/Mtftp6Impl.c
1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option...
[mirror_edk2.git] / NetworkPkg / Mtftp6Dxe / Mtftp6Impl.c
index 79ae6e0741d0b88397be395d9fff28602cb97f0e..4a4e5b192c27f533c6c4ba36b4b233fbe7186109 100644 (file)
@@ -8,7 +8,7 @@
    RFC2348 - TFTP Blocksize Option\r
    RFC2349 - TFTP Timeout Interval and Transfer Size Options\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -189,13 +189,15 @@ EfiMtftp6Configure (
     // Don't configure the udpio here because each operation might override\r
     // the configuration, so delay udpio configuration in each operation.\r
     //\r
-    Instance->UdpIo = UdpIoCreateIo (\r
-                        Service->Controller,\r
-                        Service->Image,\r
-                        Mtftp6ConfigDummyUdpIo,\r
-                        UDP_IO_UDP6_VERSION,\r
-                        NULL\r
-                        );\r
+    if (Instance->UdpIo == NULL) {\r
+      Instance->UdpIo = UdpIoCreateIo (\r
+                          Service->Controller,\r
+                          Service->Image,\r
+                          Mtftp6ConfigDummyUdpIo,\r
+                          UDP_IO_UDP6_VERSION,\r
+                          NULL\r
+                          );\r
+    }\r
 \r
     if (Instance->UdpIo == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
@@ -620,11 +622,11 @@ EfiMtftp6Poll (
   Instance = MTFTP6_INSTANCE_FROM_THIS (This);\r
 \r
   //\r
-  // Check the instance whether configured or in destory.\r
+  // Check the instance whether configured or in destroy.\r
   //\r
   if (Instance->Config == NULL) {\r
     return EFI_NOT_STARTED;\r
-  } else if (Instance->InDestory) {\r
+  } else if (Instance->InDestroy) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r