diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-07-30 21:59:26 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-07-30 21:59:26 +0000 |
commit | e1004a0a817c03d11ffc2f547def4d83c3df80a1 (patch) | |
tree | c19ebe1785a29d5381c68dd20cf3c05944836b72 | |
parent | 0cd96bdd5e7e4379b4276d1857e965c0f023b694 (diff) | |
download | netsurf-e1004a0a817c03d11ffc2f547def4d83c3df80a1.tar.gz netsurf-e1004a0a817c03d11ffc2f547def4d83c3df80a1.tar.bz2 |
Make polling function return after a fetch_free operation, as under certain (unknown)
circumstances it starts wandering off to nodes which don't exist (the same happens
when using NetSurf's rings).
Remove debug
svn path=/trunk/netsurf/; revision=8915
-rwxr-xr-x | amiga/fetch_file.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/amiga/fetch_file.c b/amiga/fetch_file.c index f8d3e777e..acc0d4724 100755 --- a/amiga/fetch_file.c +++ b/amiga/fetch_file.c @@ -33,7 +33,7 @@ #include <proto/utility.h> #include "utils/messages.h" -static struct MinList *ami_file_fetcher_list; +static struct MinList *ami_file_fetcher_list = NULL; static UBYTE *ami_file_fetcher_buffer = NULL; /** Information for a single fetch. */ @@ -168,7 +168,7 @@ bool ami_fetch_file_start(void *vfetch) { struct ami_file_fetch_info *fetch = (struct ami_file_fetch_info*)vfetch; - LOG(("ami file fetcher start")); + /* LOG(("ami file fetcher start")); */ fetch->cachedata.req_time = time(NULL); fetch->cachedata.res_time = time(NULL); @@ -187,19 +187,13 @@ void ami_fetch_file_abort(void *vf) { struct ami_file_fetch_info *fetch = (struct ami_file_fetch_info*)vf; - LOG(("ami file fetcher abort")); + /* LOG(("ami file fetcher abort")); */ if (fetch->fh) { FClose(fetch->fh); fetch->fh = 0; - fetch->aborted = true; } -/* -else { - fetch_remove_from_queues(fetch->fetch_handle); - fetch_free(fetch->fetch_handle); - } -*/ + fetch->aborted = true; } @@ -210,7 +204,7 @@ else { void ami_fetch_file_free(void *vf) { struct ami_file_fetch_info *fetch = (struct ami_file_fetch_info*)vf; - LOG(("ami file fetcher free %lx",fetch)); + /* LOG(("ami file fetcher free %lx",fetch)); */ if(fetch->fh) FClose(fetch->fh); if(fetch->mimetype) free(fetch->mimetype); @@ -224,7 +218,7 @@ static void ami_fetch_file_send_callback(fetch_msg msg, unsigned long size) { fetch->locked = true; - LOG(("ami file fetcher callback %ld",msg)); + /* LOG(("ami file fetcher callback %ld",msg)); */ fetch_send_callback(msg,fetch->fetch_handle,data,size); fetch->locked = false; } @@ -250,7 +244,6 @@ void ami_fetch_file_poll(const char *scheme_ignored) nnode=(struct nsObject *)GetSucc((struct Node *)node); fetch = (struct ami_file_fetch_info *)node->objstruct; - LOG(("polling %lx",fetch)); if(fetch->locked) continue; @@ -262,8 +255,6 @@ void ami_fetch_file_poll(const char *scheme_ignored) len = FRead(fetch->fh,ami_file_fetcher_buffer,1,1024); - LOG(("fetch %lx read %ld",fetch,len)); - ami_fetch_file_send_callback(FETCH_DATA, fetch,ami_file_fetcher_buffer,len); @@ -313,6 +304,7 @@ void ami_fetch_file_poll(const char *scheme_ignored) { fetch_remove_from_queues(fetch->fetch_handle); fetch_free(fetch->fetch_handle); + return; } }while(node=nnode); } |