From 9f575c590b3c304ab02707ee3378bd2e4f4c9094 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 30 Mar 2010 21:36:39 +0000 Subject: Do not abort fetch on receipt of FETCH_ERROR: the fetch has already been destroyed. Implement LLCACHE_EVENT_ERROR case of hlcache_llcache_callback(). svn path=/trunk/netsurf/; revision=10218 --- content/hlcache.c | 9 ++++++++- content/llcache.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'content') diff --git a/content/hlcache.c b/content/hlcache.c index d18a76b6c..3a55dbeb4 100644 --- a/content/hlcache.c +++ b/content/hlcache.c @@ -175,7 +175,14 @@ nserror hlcache_llcache_callback(llcache_handle *handle, /* should never happen: the handler must be changed */ break; case LLCACHE_EVENT_ERROR: - /** \todo handle errors */ + if (ctx->handle->cb != NULL) { + hlcache_event hlevent; + + hlevent.type = CONTENT_MSG_ERROR; + hlevent.data.error = event->data.msg; + + ctx->handle->cb(ctx->handle, &hlevent, ctx->handle->pw); + } break; case LLCACHE_EVENT_PROGRESS: break; diff --git a/content/llcache.c b/content/llcache.c index 19bb7e089..49556b1fe 100644 --- a/content/llcache.c +++ b/content/llcache.c @@ -1327,7 +1327,7 @@ void llcache_fetch_callback(fetch_msg msg, void *p, const void *data, /* Out-of-band information */ case FETCH_ERROR: /* An error occurred while fetching */ - fetch_abort(object->fetch.fetch); + /* The fetch has has already been cleaned up by the fetcher */ object->fetch.fetch = NULL; /** \todo Ensure this object becomes stale */ -- cgit v1.2.3