瀏覽代碼

[downloader] Treat redirection failures as fatal

Debugged-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 年之前
父節點
當前提交
89c6db838f
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6
    2
      src/core/downloader.c

+ 6
- 2
src/core/downloader.c 查看文件

@@ -190,14 +190,18 @@ static int downloader_vredirect ( struct downloader *downloader, int type,
190 190
 
191 191
 		/* Set image URI */
192 192
 		if ( ( rc = image_set_uri ( downloader->image, uri ) ) != 0 )
193
-			return rc;
193
+			goto err;
194 194
 	}
195 195
 
196 196
 	/* Redirect to new location */
197 197
 	if ( ( rc = xfer_vreopen ( &downloader->xfer, type, args ) ) != 0 )
198
-		return rc;
198
+		goto err;
199 199
 
200 200
 	return 0;
201
+
202
+ err:
203
+	downloader_finished ( downloader, rc );
204
+	return rc;
201 205
 }
202 206
 
203 207
 /** Downloader data transfer interface operations */

Loading…
取消
儲存