]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg:Fix Http boot download issue.
authorZhang Lubo <lubo.zhang@intel.com>
Thu, 24 Mar 2016 08:59:22 +0000 (16:59 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Fri, 25 Mar 2016 03:32:57 +0000 (11:32 +0800)
When http boot download the second time without return
out of the boot manager, the DHCP process will start twice
with the same Boot file uri and print the information twice
which we not expected. This is caused by wrong logic
of handling the device path of the boot file when loading it.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
NetworkPkg/HttpBootDxe/HttpBootImpl.c

index 3adb08d9f69c5460343b122c7602abe294cb3184..c4a3e707fb07c4950ada3955fac5a9ecb55a1b2d 100644 (file)
@@ -431,7 +431,7 @@ HttpBootDxeLoadFile (
     // 2. The required boot FilePath is different with the one we produced in the device path\r
     // protocol.\r
     //\r
     // 2. The required boot FilePath is different with the one we produced in the device path\r
     // protocol.\r
     //\r
-    if ((UsingIpv6 != Private->UsingIpv6) || !IsDevicePathEnd(FilePath)) {\r
+    if ((UsingIpv6 != Private->UsingIpv6) || ((Private->FilePathUri != NULL) && (AsciiStrCmp (Private->BootFileUri, Private->FilePathUri) != 0))) {\r
       Status = HttpBootStop (Private);\r
       if (!EFI_ERROR (Status)) {\r
         Status = HttpBootStart (Private, UsingIpv6, FilePath);\r
       Status = HttpBootStop (Private);\r
       if (!EFI_ERROR (Status)) {\r
         Status = HttpBootStart (Private, UsingIpv6, FilePath);\r