diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2011-02-23 22:41:17 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2011-02-23 22:41:17 +0000 |
commit | 308f549f7849da791ca1b52df67fcf0ccc09e6af (patch) | |
tree | ef3df721eaf3b8498029dbde0874810a07896153 /content/fetchers/about.c | |
parent | 79d9d6abab46d5b530efa863670daca0c68ffee5 (diff) | |
download | netsurf-308f549f7849da791ca1b52df67fcf0ccc09e6af.tar.gz netsurf-308f549f7849da791ca1b52df67fcf0ccc09e6af.tar.bz2 |
Fix backend fetcher poll loops
svn path=/trunk/netsurf/; revision=11775
Diffstat (limited to 'content/fetchers/about.c')
-rw-r--r-- | content/fetchers/about.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/content/fetchers/about.c b/content/fetchers/about.c index c4a376a29..9def04a2c 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -353,10 +353,6 @@ static void fetch_about_poll(const char *scheme) /* Iterate over ring, processing each pending fetch */ c = ring; do { - /* Take a copy of the next pointer as we may destroy - * the ring item we're currently processing */ - next = c->r_next; - /* Ignore fetches that have been flagged as locked. * This allows safe re-entrant calls to this function. * Re-entrancy can occur if, as a result of a callback, @@ -364,6 +360,7 @@ static void fetch_about_poll(const char *scheme) * again. */ if (c->locked == true) { + next = c->r_next; continue; } @@ -373,6 +370,10 @@ static void fetch_about_poll(const char *scheme) c->handler(c); } + /* Compute next fetch item at the last possible moment + * as processing this item may have added to the ring + */ + next = c->r_next; fetch_remove_from_queues(c->fetchh); fetch_free(c->fetchh); |