diff options
author | James Bursa <james@netsurf-browser.org> | 2004-09-03 22:33:05 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-09-03 22:33:05 +0000 |
commit | fb5082605cc100b493717bce25cb6bf6123e03d0 (patch) | |
tree | 3dc808fd507e7f10e5742d846f6d68bc400299e5 | |
parent | 9986b3b4ee078cb2ebe150358e32d884ac6fead0 (diff) | |
download | netsurf-fb5082605cc100b493717bce25cb6bf6123e03d0.tar.gz netsurf-fb5082605cc100b493717bce25cb6bf6123e03d0.tar.bz2 |
[project @ 2004-09-03 22:33:05 by bursa]
Fix bugs relating to aborting fetches.
svn path=/import/netsurf/; revision=1264
-rw-r--r-- | content/fetch.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/content/fetch.c b/content/fetch.c index a468a05a9..c072a1e5a 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -418,7 +418,14 @@ void fetch_abort(struct fetch *f) { assert(f); LOG(("fetch %p, url '%s'", f, f->url)); - f->abort = true; + if (f->queue_prev) { + f->queue_prev->queue_next = f->queue_next; + if (f->queue_next) + f->queue_next->queue_prev = f->queue_prev; + fetch_free(f); + } else { + f->abort = true; + } } @@ -579,7 +586,7 @@ void fetch_done(CURL *curl_handle, CURLcode result) callback = f->callback; p = f->p; - if (result == CURLE_OK) { + if (!abort && result == CURLE_OK) { /* fetch completed normally */ if (!f->had_headers && fetch_process_headers(f)) ; /* redirect with no body or similar */ |