X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fpaths.c;h=dd54ba2bc178289e6ba240c04e24af485ee8c1cf;hp=c5b577823746f1c7cab1cc02f176baf494782ff5;hb=735a9ed99a56df4e6bc496bdbe30a5aaa80a9685;hpb=d30872fe40c87300e62ef2aea484b9cea618c9de diff --git a/discover/paths.c b/discover/paths.c index c5b5778..dd54ba2 100644 --- a/discover/paths.c +++ b/discover/paths.c @@ -3,11 +3,13 @@ #endif #include +#include #include #include #include -#include +#include #include +#include #include #include @@ -547,6 +549,7 @@ struct load_url_result *load_url_async(void *ctx, struct pb_url *url, { struct load_url_result *result; struct load_task *task; + struct addrinfo *res; int flags = 0; if (!url) @@ -579,7 +582,8 @@ struct load_url_result *load_url_async(void *ctx, struct pb_url *url, /* If the url is remote but network is not yet available queue up this * load for later */ - if (!system_info_network_available() && url->scheme != pb_url_file) { + if (url->scheme != pb_url_file && + getaddrinfo(url->host, NULL, NULL, &res) != 0) { pb_log("load task for %s queued pending network\n", url->full); pending_network_jobs_add(task, flags); task->result->status = LOAD_ASYNC;