run_active_slot(slot);
ret = handle_curl_result(&results);
} else {
- error("Unable to start HTTP request for %s", url);
+ snprintf(curl_errorstr, sizeof(curl_errorstr),
+ "failed to start HTTP request");
ret = HTTP_START_FAILED;
}
return ret;
}
-int http_error(const char *url, int ret)
+void http_error(const char *url)
{
- /* http_request has already handled HTTP_START_FAILED. */
- if (ret != HTTP_START_FAILED)
- error("%s while accessing %s", curl_errorstr, url);
-
- return ret;
+ error("%s while accessing %s", curl_errorstr, url);
}
int http_fetch_ref(const char *base, struct ref *ref)
int http_get_strbuf(const char *url, struct strbuf *content_type, struct strbuf *result, int options);
/*
- * Prints an error message using error() containing url and curl_errorstr,
- * and returns ret.
+ * Prints an error message using error() containing url and curl_errorstr.
*/
-int http_error(const char *url, int ret);
+void http_error(const char *url);
extern int http_fetch_ref(const char *base, struct ref *ref);
die("Authentication failed for '%s'", url);
default:
show_http_message(&type, &buffer);
- http_error(url, http_ret);
+ http_error(url);
die("HTTP request failed");
}