mirror of https://github.com/ipxe/ipxe.git
[downloader] Treat redirection failures as fatal
Debugged-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/56/head
parent
5e2a7481ad
commit
89c6db838f
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue