summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-08-19 17:58:45 +0200
committerDan McGee <dan@archlinux.org>2011-08-22 16:15:11 +0200
commit592ed13bce83afeeb8deff5a81dc782fdc32ac11 (patch)
tree8499c22116f586c018e1f49c59a2dee3b02f0e7b
parent329a7b7e242e0e4594eec9f70db4bd82d116c1c2 (diff)
downloadpacman-592ed13bce83afeeb8deff5a81dc782fdc32ac11.tar.gz
pacman-592ed13bce83afeeb8deff5a81dc782fdc32ac11.tar.xz
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 <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/dload.c8
-rw-r--r--lib/libalpm/dload.h2
2 files changed, 5 insertions, 5 deletions
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;