summaryrefslogtreecommitdiff
path: root/content/fetch.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-11-06 19:41:41 +0000
committerJames Bursa <james@netsurf-browser.org>2003-11-06 19:41:41 +0000
commitb212e59a20f304132e8c6636771d250ac7998ad3 (patch)
tree41ae6f084229ac7a517b81dbe6a3f2e3f3ea6137 /content/fetch.c
parent33759f1e7b56b9ec682f3b82c878818018e652c8 (diff)
downloadnetsurf-b212e59a20f304132e8c6636771d250ac7998ad3.tar.gz
netsurf-b212e59a20f304132e8c6636771d250ac7998ad3.tar.bz2
[project @ 2003-11-06 19:41:41 by bursa]
Mask null polls and use PollIdle when appropriate. svn path=/import/netsurf/; revision=406
Diffstat (limited to 'content/fetch.c')
-rw-r--r--content/fetch.c6
1 files changed, 6 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;
}