diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-05-08 17:54:44 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-05-08 17:54:44 +0100 |
commit | cd7f1eceea81a69e5b4dcdef90d45aab44f8a11f (patch) | |
tree | aa9ac5ffab173f59b590b39f665356e7127e02bf /desktop/download.c | |
parent | 096bd47ab0018e7b9c3affd58b6134463e2aaa65 (diff) | |
download | netsurf-cd7f1eceea81a69e5b4dcdef90d45aab44f8a11f.tar.gz netsurf-cd7f1eceea81a69e5b4dcdef90d45aab44f8a11f.tar.bz2 |
make download_context_get_url() return an nsurl and adapt callers to cope
Diffstat (limited to 'desktop/download.c')
-rw-r--r-- | desktop/download.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/desktop/download.c b/desktop/download.c index cad04779f..0f3fcb6f5 100644 --- a/desktop/download.c +++ b/desktop/download.c @@ -71,11 +71,11 @@ static char *download_parse_filename(const char *filename) * \param url URL of item being fetched * \return Default filename, or NULL on memory exhaustion */ -static char *download_default_filename(const char *url) +static char *download_default_filename(nsurl *url) { char *nice; - if (url_nice(url, &nice, false) == NSERROR_OK) + if (url_nice(nsurl_access(url), &nice, false) == NSERROR_OK) return nice; return NULL; @@ -140,8 +140,7 @@ static nserror download_context_process_headers(download_context *ctx) ctx->total_length = length; if (ctx->filename == NULL) { ctx->filename = download_default_filename( - nsurl_access( - llcache_handle_get_url(ctx->llcache))); + llcache_handle_get_url(ctx->llcache)); } http_content_type_destroy(content_type); @@ -283,9 +282,9 @@ void download_context_abort(download_context *ctx) } /* See download.h for documentation */ -const char *download_context_get_url(const download_context *ctx) +nsurl *download_context_get_url(const download_context *ctx) { - return nsurl_access(llcache_handle_get_url(ctx->llcache)); + return llcache_handle_get_url(ctx->llcache); } /* See download.h for documentation */ |