From: Zhang Lubo Date: Thu, 24 Mar 2016 08:59:22 +0000 (+0800) Subject: NetworkPkg:Fix Http boot download issue. X-Git-Tag: edk2-stable201903~7538 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=651aeac67248c798c8c22dfd04580d8961cf09d0 NetworkPkg:Fix Http boot download issue. 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 Cc: Ye Ting Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo Reviewed-by: Fu Siyuan --- diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c index 3adb08d9f6..c4a3e707fb 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c +++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c @@ -431,7 +431,7 @@ HttpBootDxeLoadFile ( // 2. The required boot FilePath is different with the one we produced in the device path // protocol. // - if ((UsingIpv6 != Private->UsingIpv6) || !IsDevicePathEnd(FilePath)) { + if ((UsingIpv6 != Private->UsingIpv6) || ((Private->FilePathUri != NULL) && (AsciiStrCmp (Private->BootFileUri, Private->FilePathUri) != 0))) { Status = HttpBootStop (Private); if (!EFI_ERROR (Status)) { Status = HttpBootStart (Private, UsingIpv6, FilePath);