summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
diff options
context:
space:
mode:
authorLeandro Becker <lbecker@positivo.com.br>2024-09-20 10:37:57 -0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-10-15 22:26:37 +0000
commitb3efbda1660372f3973c29cde0e92528862c4171 (patch)
treeac505f861184d99d366dec9f675934485aa8be9a /NetworkPkg
parent081cf576a226e70ce4134dda19baf977d0b8bc64 (diff)
downloadedk2-b3efbda1660372f3973c29cde0e92528862c4171.tar.gz
edk2-b3efbda1660372f3973c29cde0e92528862c4171.tar.bz2
edk2-b3efbda1660372f3973c29cde0e92528862c4171.zip
NetworkPkg/HttpBootDxe: Report download error when resume attempts fail
When all resume attempts to continue an interrupted NBP file download have failed, report the failure status to the caller. Original implementation was returning success when number of retries reaches the limit defined by PcdMaxHttpResumeRetries. Signed-off-by: Leandro Gustavo Biss Becker <lbecker@positivo.com.br>
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootImpl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
index 6f10bcff39..91e934ce06 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
@@ -388,7 +388,8 @@ HttpBootGetBootFileCaller (
ImageType
);
if (!EFI_ERROR (Status) ||
- ((Status != EFI_TIMEOUT) && (Status != EFI_DEVICE_ERROR)))
+ ((Status != EFI_TIMEOUT) && (Status != EFI_DEVICE_ERROR)) ||
+ (Retries >= PcdGet32 (PcdMaxHttpResumeRetries)))
{
break;
}