mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 21:41:43 +03:00
[downloader] Treat redirection failures as fatal
Debugged-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -190,14 +190,18 @@ static int downloader_vredirect ( struct downloader *downloader, int type,
|
|||||||
|
|
||||||
/* Set image URI */
|
/* Set image URI */
|
||||||
if ( ( rc = image_set_uri ( downloader->image, uri ) ) != 0 )
|
if ( ( rc = image_set_uri ( downloader->image, uri ) ) != 0 )
|
||||||
return rc;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Redirect to new location */
|
/* Redirect to new location */
|
||||||
if ( ( rc = xfer_vreopen ( &downloader->xfer, type, args ) ) != 0 )
|
if ( ( rc = xfer_vreopen ( &downloader->xfer, type, args ) ) != 0 )
|
||||||
return rc;
|
goto err;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err:
|
||||||
|
downloader_finished ( downloader, rc );
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Downloader data transfer interface operations */
|
/** Downloader data transfer interface operations */
|
||||||
|
|||||||
Reference in New Issue
Block a user