summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-09-17 17:44:12 +0000
committerJames Bursa <james@netsurf-browser.org>2003-09-17 17:44:12 +0000
commit6dc14a06b7df3633307e2cbaec49ef785406026d (patch)
tree96682cc79b116559e469b8a7bf7f97513b18777b /content
parent3db6bacff561d3935b813354318896138094466b (diff)
downloadnetsurf-6dc14a06b7df3633307e2cbaec49ef785406026d.tar.gz
netsurf-6dc14a06b7df3633307e2cbaec49ef785406026d.tar.bz2
[project @ 2003-09-17 17:44:12 by bursa]
Fix aborting fetches. svn path=/import/netsurf/; revision=299
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 300b68023..3f87454e1 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -168,6 +168,7 @@ struct fetch * fetch_start(char *url, char *referer,
if (host_fetch != 0) {
/* fetch from this host in progress: queue the new fetch */
LOG(("queueing"));
+ fetch->curl_handle = 0;
fetch->queue = host_fetch->queue;
host_fetch->queue = fetch;
return fetch;
@@ -269,8 +270,10 @@ void fetch_abort(struct fetch *f)
f->next->prev = f->prev;
/* remove from curl multi handle */
- codem = curl_multi_remove_handle(curl_multi, f->curl_handle);
- assert(codem == CURLM_OK);
+ if (f->cull_handle) {
+ codem = curl_multi_remove_handle(curl_multi, f->curl_handle);
+ assert(codem == CURLM_OK);
+ }
if (f->queue != 0) {
/* start a queued fetch for this host, reusing the handle for this host */