diff options
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -18,7 +18,7 @@ #include "protocol.h" #include "string-list.h" #include "object-file.h" -#include "object-store.h" +#include "object-store-ll.h" static struct trace_key trace_curl = TRACE_KEY_INIT(CURL); static int trace_curl_data = 1; @@ -196,7 +196,7 @@ static inline int is_hdr_continuation(const char *ptr, const size_t size) return size && (*ptr == ' ' || *ptr == '\t'); } -static size_t fwrite_wwwauth(char *ptr, size_t eltsize, size_t nmemb, void *p) +static size_t fwrite_wwwauth(char *ptr, size_t eltsize, size_t nmemb, void *p UNUSED) { size_t size = eltsize * nmemb; struct strvec *values = &http_auth.wwwauth_headers; @@ -295,7 +295,8 @@ exit: return size; } -size_t fwrite_null(char *ptr, size_t eltsize, size_t nmemb, void *strbuf) +size_t fwrite_null(char *ptr UNUSED, size_t eltsize UNUSED, size_t nmemb, + void *data UNUSED) { return nmemb; } @@ -363,7 +364,8 @@ static void process_curl_messages(void) } } -static int http_options(const char *var, const char *value, void *cb) +static int http_options(const char *var, const char *value, + const struct config_context *ctx, void *data) { if (!strcmp("http.version", var)) { return git_config_string(&curl_http_version, var, value); @@ -413,21 +415,21 @@ static int http_options(const char *var, const char *value, void *cb) } if (!strcmp("http.minsessions", var)) { - min_curl_sessions = git_config_int(var, value); + min_curl_sessions = git_config_int(var, value, ctx->kvi); if (min_curl_sessions > 1) min_curl_sessions = 1; return 0; } if (!strcmp("http.maxrequests", var)) { - max_requests = git_config_int(var, value); + max_requests = git_config_int(var, value, ctx->kvi); return 0; } if (!strcmp("http.lowspeedlimit", var)) { - curl_low_speed_limit = (long)git_config_int(var, value); + curl_low_speed_limit = (long)git_config_int(var, value, ctx->kvi); return 0; } if (!strcmp("http.lowspeedtime", var)) { - curl_low_speed_time = (long)git_config_int(var, value); + curl_low_speed_time = (long)git_config_int(var, value, ctx->kvi); return 0; } @@ -463,7 +465,7 @@ static int http_options(const char *var, const char *value, void *cb) } if (!strcmp("http.postbuffer", var)) { - http_post_buffer = git_config_ssize_t(var, value); + http_post_buffer = git_config_ssize_t(var, value, ctx->kvi); if (http_post_buffer < 0) warning(_("negative value for http.postBuffer; defaulting to %d"), LARGE_PACKET_MAX); if (http_post_buffer < LARGE_PACKET_MAX) @@ -534,7 +536,7 @@ static int http_options(const char *var, const char *value, void *cb) } /* Fall back on the default ones */ - return git_default_config(var, value, cb); + return git_default_config(var, value, ctx, data); } static int curl_empty_auth_enabled(void) @@ -845,7 +847,9 @@ static void curl_dump_info(char *data, size_t size) strbuf_release(&buf); } -static int curl_trace(CURL *handle, curl_infotype type, char *data, size_t size, void *userp) +static int curl_trace(CURL *handle UNUSED, curl_infotype type, + char *data, size_t size, + void *userp UNUSED) { const char *text; enum { NO_FILTER = 0, DO_FILTER = 1 }; |