From 5314cebf5fe766bdca6c779e785b8dfaa3808142 Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Thu, 23 Mar 2017 17:42:37 +1100 Subject: discover/paths: Add network jobs to queue Load tasks that start before the network is available will fail. Rather than just fail these tasks, add them to a queue that is processed once the network is ready. This helps users who try to request files early in setup, as well as very early running load tasks. Signed-off-by: Samuel Mendoza-Jonas --- discover/device-handler.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'discover/device-handler.c') diff --git a/discover/device-handler.c b/discover/device-handler.c index a0c21b7..730be85 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -361,6 +361,7 @@ void device_handler_reinit(struct device_handler *handler) /* Cancel any remaining async jobs */ process_stop_async_all(); + pending_network_jobs_cancel(); /* free unresolved boot options */ list_for_each_entry_safe(&handler->unresolved_boot_options, @@ -1083,6 +1084,8 @@ int device_handler_dhcp(struct device_handler *handler, _("Processing DHCP lease response (ip: %s)"), event_get_param(event, "ip")); + pending_network_jobs_start(); + /* create our context */ ctx = device_handler_discover_context_create(handler, dev); talloc_steal(ctx, event); -- cgit v1.2.1