diff options
author | James Bursa <james@netsurf-browser.org> | 2007-07-04 18:44:13 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2007-07-04 18:44:13 +0000 |
commit | 594eb74c4c180dd903a9a3162321e87b8a208576 (patch) | |
tree | 8d6eb34562aafae8f989ed5ee46527a3328b69ba /content/fetch.c | |
parent | 960c11de1aa674dff3c60bfd60de29f0591a1330 (diff) | |
download | netsurf-594eb74c4c180dd903a9a3162321e87b8a208576.tar.gz netsurf-594eb74c4c180dd903a9a3162321e87b8a208576.tar.bz2 |
Fix deadlock when fetching stylesheets when max_fetchers_per_host is reached by splitting fetch_can_be_freed() into fetch_remove_from_queues() and fetch_free().
svn path=/trunk/netsurf/; revision=3380
Diffstat (limited to 'content/fetch.c')
-rw-r--r-- | content/fetch.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/content/fetch.c b/content/fetch.c index b69f50be1..a325fb17a 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -89,7 +89,6 @@ static void fetch_unref_fetcher(scheme_fetcher *fetcher); static void fetch_dispatch_jobs(void); static bool fetch_choose_and_dispatch(void); static bool fetch_dispatch_job(struct fetch *fetch); -static void fetch_free(struct fetch *f); /** @@ -544,8 +543,8 @@ fetch_send_callback(fetch_msg msg, struct fetch *fetch, const void *data, fetch->callback(msg, fetch->p, data, size); } -void -fetch_can_be_freed(struct fetch *fetch) + +void fetch_remove_from_queues(struct fetch *fetch) { int all_active, all_queued; @@ -565,10 +564,9 @@ fetch_can_be_freed(struct fetch *fetch) LOG(("Fetch ring is now %d elements.", all_active)); LOG(("Queue ring is now %d elements.", all_queued)); - - fetch_free(fetch); } + void fetch_set_http_code(struct fetch *fetch, long http_code) { |