NetworkPkg: Handling timeout case in httpboot driver

This patch is used to handle timeout case when downloading
the message. The Status in the token should also be checked
to handle any response error case including timeout case.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Gary Lin <glin@suse.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Gary Lin <glin@suse.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Tested-by: Gary Lin <glin@suse.com>
Tested-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
This commit is contained in:
Jiaxin Wu
2016-05-31 22:17:28 +08:00
parent 30526a51dd
commit 7570696c57
4 changed files with 56 additions and 3 deletions

View File

@ -1008,7 +1008,10 @@ HttpBootGetBootFile (
FALSE,
&ResponseBody
);
if (EFI_ERROR (Status)) {
if (EFI_ERROR (Status) || EFI_ERROR (ResponseBody.Status)) {
if (EFI_ERROR (ResponseBody.Status)) {
Status = ResponseBody.Status;
}
goto ERROR_6;
}
ReceivedSize += ResponseBody.BodyLength;
@ -1045,7 +1048,10 @@ HttpBootGetBootFile (
FALSE,
&ResponseBody
);
if (EFI_ERROR (Status)) {
if (EFI_ERROR (Status) || EFI_ERROR (ResponseBody.Status)) {
if (EFI_ERROR (ResponseBody.Status)) {
Status = ResponseBody.Status;
}
goto ERROR_6;
}