mirror of
https://github.com/curl/curl.git
synced 2026-05-17 12:16:19 +03:00
tool_operate: use stricter curl_multi_setopt() arguments
To please the curl_multi_setopt() typechecker - set multi callback protypes to match exactylu - set CURLMOPT_MAX_HOST_CONNECTIONS as a long Closes #18357
This commit is contained in:
parent
844c385812
commit
bfbee798ca
1 changed files with 5 additions and 5 deletions
|
|
@ -1514,9 +1514,9 @@ static void on_uv_timeout(uv_timer_t *req)
|
|||
}
|
||||
|
||||
/* callback from libcurl to update the timeout expiry */
|
||||
static int cb_timeout(CURLM *multi, long timeout_ms,
|
||||
struct datauv *uv)
|
||||
static int cb_timeout(CURLM *multi, long timeout_ms, void *userp)
|
||||
{
|
||||
struct datauv *uv = userp;
|
||||
(void)multi;
|
||||
#if DEBUG_UV
|
||||
fprintf(tool_stderr, "parallel_event: cb_timeout=%ld\n", timeout_ms);
|
||||
|
|
@ -1562,11 +1562,11 @@ static void destroy_context(struct contextuv *c)
|
|||
|
||||
/* callback from libcurl to update socket activity to wait for */
|
||||
static int cb_socket(CURL *easy, curl_socket_t s, int action,
|
||||
struct datauv *uv,
|
||||
void *socketp)
|
||||
void *userp, void *socketp)
|
||||
{
|
||||
struct contextuv *c;
|
||||
int events = 0;
|
||||
struct datauv *uv = userp;
|
||||
(void)easy;
|
||||
|
||||
#if DEBUG_UV
|
||||
|
|
@ -1622,7 +1622,7 @@ static CURLcode parallel_event(struct parastate *s)
|
|||
curl_multi_setopt(s->multi, CURLMOPT_SOCKETDATA, &uv);
|
||||
curl_multi_setopt(s->multi, CURLMOPT_TIMERFUNCTION, cb_timeout);
|
||||
curl_multi_setopt(s->multi, CURLMOPT_TIMERDATA, &uv);
|
||||
curl_multi_setopt(s->multi, CURLMOPT_MAX_HOST_CONNECTIONS,
|
||||
curl_multi_setopt(s->multi, CURLMOPT_MAX_HOST_CONNECTIONS, (long)
|
||||
global->parallel_host);
|
||||
|
||||
/* kickstart the thing */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue