Modify data-xfer semantics: it is no longer necessary to call one of
[people/pcmattman/gpxe.git] / src / core / downloader.c
index 653a480..15ef962 100644 (file)
@@ -114,19 +114,6 @@ static int downloader_ensure_size ( struct downloader *downloader,
  *
  */
 
-/**
- * Handle start() event received via job control interface
- *
- * @v job              Downloader job control interface
- */
-static void downloader_job_start ( struct job_interface *job ) {
-       struct downloader *downloader = 
-               container_of ( job, struct downloader, job );
-
-       /* Start data transfer */
-       xfer_request_all ( &downloader->xfer );
-}
-
 /**
  * Handle kill() event received via job control interface
  *
@@ -142,7 +129,7 @@ static void downloader_job_kill ( struct job_interface *job ) {
 
 /** Downloader job control interface operations */
 static struct job_interface_operations downloader_job_operations = {
-       .start          = downloader_job_start,
+       .start          = ignore_job_start,
        .done           = ignore_job_done,
        .kill           = downloader_job_kill,
        .progress       = ignore_job_progress,
@@ -239,7 +226,7 @@ static void downloader_xfer_close ( struct xfer_interface *xfer, int rc ) {
 /** Downloader data transfer interface operations */
 static struct xfer_interface_operations downloader_xfer_operations = {
        .close          = downloader_xfer_close,
-       .vredirect      = vopen,
+       .vredirect      = xfer_vopen,
        .request        = ignore_xfer_request,
        .seek           = downloader_xfer_seek,
        .deliver_iob    = xfer_deliver_as_raw,
@@ -285,8 +272,8 @@ int create_downloader ( struct job_interface *job, const char *uri_string,
        downloader->register_image = register_image;
 
        /* Instantiate child objects and attach to our interfaces */
-       if ( ( rc = open ( &downloader->xfer, LOCATION_URI,
-                          uri_string ) ) != 0 )
+       if ( ( rc = xfer_open ( &downloader->xfer, LOCATION_URI,
+                               uri_string ) ) != 0 )
                goto err;
 
        /* Attach parent interface, mortalise self, and return */