summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Lubo <lubo.zhang@intel.com>2015-12-18 05:43:19 +0000
committervanjeff <vanjeff@Edk2>2015-12-18 05:43:19 +0000
commita8d5a3a25be665915784a0cbdec0ff7afab67a8e (patch)
tree2a81a1936009f8c88c408bc2ca1526bd6606ab32
parent210774babaca41d457777aa030b571286b4dfc7a (diff)
downloadedk2-platforms-a8d5a3a25be665915784a0cbdec0ff7afab67a8e.tar.xz
NetworkPkg:Fix the issue Http boot hang when network failed.
For both IPv4 and IPv6, when network transfer failed, such as disconnected cable or disable http server, HTTP boot should exit back to the menu UI rather than hang. (Sync patch r19335 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@19352 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--NetworkPkg/HttpDxe/HttpProto.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c
index d4ab74f009..b7cd0fdfcc 100644
--- a/NetworkPkg/HttpDxe/HttpProto.c
+++ b/NetworkPkg/HttpDxe/HttpProto.c
@@ -150,6 +150,9 @@ HttpTcpReceiveNotifyDpc (
gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
if (EFI_ERROR (Wrap->TcpWrap.Rx6Token.CompletionToken.Status)) {
+ Wrap->HttpToken->Status = Wrap->TcpWrap.Rx6Token.CompletionToken.Status;
+ gBS->SignalEvent (Wrap->HttpToken->Event);
+ FreePool (Wrap);
return ;
}
@@ -157,6 +160,9 @@ HttpTcpReceiveNotifyDpc (
gBS->CloseEvent (Wrap->TcpWrap.Rx4Token.CompletionToken.Event);
if (EFI_ERROR (Wrap->TcpWrap.Rx4Token.CompletionToken.Status)) {
+ Wrap->HttpToken->Status = Wrap->TcpWrap.Rx4Token.CompletionToken.Status;
+ gBS->SignalEvent (Wrap->HttpToken->Event);
+ FreePool (Wrap);
return ;
}
}