From b212e59a20f304132e8c6636771d250ac7998ad3 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Thu, 6 Nov 2003 19:41:41 +0000 Subject: [project @ 2003-11-06 19:41:41 by bursa] Mask null polls and use PollIdle when appropriate. svn path=/import/netsurf/; revision=406 --- content/fetch.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'content/fetch.c') 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; } -- cgit v1.2.3