summaryrefslogtreecommitdiff
path: root/content/hlcache.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-10-03 15:56:47 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-10-03 15:56:47 +0000
commit36eff6da2bfe5b183c2b4876bb2afe9dedec9b39 (patch)
tree6cc96c71499d22745947113db5c6fc118c286d1f /content/hlcache.c
parenta595d7c4bbe44f7de6c565a4fbbdcff735f0ce99 (diff)
downloadnetsurf-36eff6da2bfe5b183c2b4876bb2afe9dedec9b39.tar.gz
netsurf-36eff6da2bfe5b183c2b4876bb2afe9dedec9b39.tar.bz2
Port more internals to nsurl. Front ends may need updating.
svn path=/trunk/netsurf/; revision=12926
Diffstat (limited to 'content/hlcache.c')
-rw-r--r--content/hlcache.c34
1 files changed, 3 insertions, 31 deletions
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;