From 36eff6da2bfe5b183c2b4876bb2afe9dedec9b39 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 3 Oct 2011 15:56:47 +0000 Subject: Port more internals to nsurl. Front ends may need updating. svn path=/trunk/netsurf/; revision=12926 --- content/hlcache.c | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) (limited to 'content/hlcache.c') diff --git a/content/hlcache.c b/content/hlcache.c index f7da968b5..cb5438a8b 100644 --- a/content/hlcache.c +++ b/content/hlcache.c @@ -225,16 +225,14 @@ nserror hlcache_poll(void) } /* See hlcache.h for documentation */ -nserror hlcache_handle_retrieve(const char *url, uint32_t flags, - const char *referer, llcache_post_data *post, +nserror hlcache_handle_retrieve(nsurl *url, uint32_t flags, + nsurl *referer, llcache_post_data *post, hlcache_handle_callback cb, void *pw, hlcache_child_context *child, content_type accepted_types, hlcache_handle **result) { hlcache_retrieval_ctx *ctx; nserror error; - nsurl *nsref = NULL; - nsurl *nsurl; assert(cb != NULL); @@ -266,42 +264,16 @@ nserror hlcache_handle_retrieve(const char *url, uint32_t flags, ctx->handle->cb = cb; ctx->handle->pw = pw; - error = nsurl_create(url, &nsurl); - if (error != NSERROR_OK) { - free((char *) ctx->child.charset); - free(ctx->handle); - free(ctx); - return error; - } - - if (referer != NULL) { - error = nsurl_create(referer, &nsref); - if (error != NSERROR_OK) { - free((char *) ctx->child.charset); - free(ctx->handle); - free(ctx); - nsurl_unref(nsurl); - return error; - } - } - - error = llcache_handle_retrieve(nsurl, flags, nsref, post, + error = llcache_handle_retrieve(url, flags, referer, post, hlcache_llcache_callback, ctx, &ctx->llcache); if (error != NSERROR_OK) { - nsurl_unref(nsurl); - if (nsref != NULL) - nsurl_unref(nsref); free((char *) ctx->child.charset); free(ctx->handle); free(ctx); return error; } - nsurl_unref(nsurl); - if (nsref != NULL) - nsurl_unref(nsref); - RING_INSERT(hlcache->retrieval_ctx_ring, ctx); *result = ctx->handle; -- cgit v1.2.3