diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/fetch.c | 6 | ||||
-rw-r--r-- | content/fetch.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/content/fetch.c b/content/fetch.c index a5673a08c..a3ff6e190 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -35,6 +35,8 @@ #include "netsurf/utils/utils.h" +bool fetch_active; /**< Fetches in progress, please call fetch_poll(). */ + /** Information for a single fetch. */ struct fetch { CURL * curl_handle; /**< cURL handle if being fetched, or 0. */ @@ -209,6 +211,7 @@ struct fetch * fetch_start(char *url, char *referer, if (fetch_list != 0) fetch_list->prev = fetch; fetch_list = fetch; + fetch_active = true; /* create the curl easy handle */ fetch->curl_handle = curl_easy_init(); @@ -468,6 +471,9 @@ void fetch_poll(void) } curl_msg = curl_multi_info_read(curl_multi, &queue); } + + if (!fetch_list) + fetch_active = false; } diff --git a/content/fetch.h b/content/fetch.h index 492645df9..fad1f50f0 100644 --- a/content/fetch.h +++ b/content/fetch.h @@ -20,6 +20,8 @@ struct content; struct fetch; struct form_successful_control; +extern bool fetch_active; + void fetch_init(void); struct fetch * fetch_start(char *url, char *referer, void (*callback)(fetch_msg msg, void *p, char *data, unsigned long size), |