Selaa lähdekoodia

[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 9 vuotta sitten
vanhempi
commit
89c6db838f
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6
    2
      src/core/downloader.c

+ 6
- 2
src/core/downloader.c Näytä tiedosto

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

Loading…
Peruuta
Tallenna