From 592ed13bce83afeeb8deff5a81dc782fdc32ac11 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 19 Aug 2011 11:58:45 -0400 Subject: dload: rename cd_filename to content_disp_name This is more in line with the menagerie of file name members that we now have on the payload struct. Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- lib/libalpm/dload.c | 8 ++++---- lib/libalpm/dload.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 3bdf84a3..ff3ac6df 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -168,7 +168,7 @@ static size_t parse_headers(void *ptr, size_t size, size_t nmemb, void *user) endptr--; } - STRNDUP(payload->cd_filename, fptr, endptr - fptr + 1, + STRNDUP(payload->content_disp_name, fptr, endptr - fptr + 1, RET_ERR(payload->handle, ALPM_ERR_MEMORY, realsize)); } } @@ -360,10 +360,10 @@ static int curl_download_internal(struct dload_payload *payload, goto cleanup; } - if(payload->cd_filename) { + if(payload->content_disp_name) { /* content-disposition header has a better name for our file */ free(payload->destfile_name); - payload->destfile_name = get_fullpath(localpath, payload->cd_filename, ""); + payload->destfile_name = get_fullpath(localpath, payload->content_disp_name, ""); } else { const char *effective_filename = strrchr(effective_url, '/'); if(effective_filename && strlen(effective_filename) > 2) { @@ -515,7 +515,7 @@ void _alpm_dload_payload_free(struct dload_payload *payload) { ASSERT(payload, return); FREE(payload->fileurl); - FREE(payload->cd_filename); + FREE(payload->content_disp_name); FREE(payload->tempfile_name); FREE(payload->destfile_name); FREE(payload); diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h index 41a3bc15..cc6cc240 100644 --- a/lib/libalpm/dload.h +++ b/lib/libalpm/dload.h @@ -30,7 +30,7 @@ struct dload_payload { const char *remote_name; char *tempfile_name; char *destfile_name; - char *cd_filename; + char *content_disp_name; char *fileurl; double initial_size; long max_size; -- cgit v1.2.3-70-g09d2