Lubo
I think the AsciiStrCmp should be "!=" zero (not zero means not identical). > -----Original Message----- > From: edk2-devel [mailto:[email protected]] On Behalf Of > Zhang Lubo > Sent: Friday, March 18, 2016 2:51 PM > To: [email protected] > Cc: Ye, Ting <[email protected]>; Fu, Siyuan <[email protected]>; Wu, > Jiaxin <[email protected]> > Subject: [edk2] [PATCH v2] NetworkPkg:Fix Http boot download issue. > > v2: > * Simplify the code logic. > > 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 <[email protected]<mailto:[email protected]>> > Cc: Ye Ting <[email protected]<mailto:[email protected]>> > Cc: Wu Jiaxin <[email protected]<mailto:[email protected]>> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Zhang Lubo <[email protected]<mailto:[email protected]>> > --- > NetworkPkg/HttpBootDxe/HttpBootImpl.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c > b/NetworkPkg/HttpBootDxe/HttpBootImpl.c > index 3adb08d..451b24d 100644 > --- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c > +++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c > @@ -428,12 +428,11 @@ HttpBootDxeLoadFile ( > // > // Restart the HTTP boot driver in 2 cases: > // 1. Http boot Driver has already been started but not on the required > IP > version. > // 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); > } > } > -- > 1.9.5.msysgit.1 > > _______________________________________________ > edk2-devel mailing list > [email protected]<mailto:[email protected]> > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

