From 7919f810f1ce72aa37cd261ecab34167aa4e9a5c Mon Sep 17 00:00:00 2001 From: Leandro Becker Date: Fri, 20 Sep 2024 10:37:57 -0300 Subject: [PATCH] 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 --- NetworkPkg/HttpBootDxe/HttpBootImpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c index 6f10bcff39df..91e934ce06c1 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; }