static void remsock(curl_socket_t s)
{
- struct fdinfo *fdp;
+ struct fdinfo *fdp = allsocks;
+
while(fdp) {
if(fdp->sockfd == s)
break;
curl_easy_setopt(e, CURLOPT_URL, conns[i].url);
curl_easy_setopt(e, CURLOPT_WRITEFUNCTION, writecallback);
curl_easy_setopt(e, CURLOPT_WRITEDATA, &conns[i]);
- curl_easy_setopt(e, CURLOPT_VERBOSE, 1);
+ curl_easy_setopt(e, CURLOPT_VERBOSE, 0);
curl_easy_setopt(e, CURLOPT_ERRORBUFFER, conns[i].error);
curl_easy_setopt(e, CURLOPT_PRIVATE, &conns[i]);
}
}
+ curl_multi_setopt(multi_handle, CURLMOPT_SOCKETFUNCTION, socket_callback);
+ curl_multi_setopt(multi_handle, CURLMOPT_SOCKETDATA, NULL);
+
/* we start the action by calling *socket() right away */
- while(CURLM_CALL_MULTI_PERFORM ==
- curl_multi_socket_all(multi_handle, socket_callback, NULL));
+ while(CURLM_CALL_MULTI_PERFORM == curl_multi_socket_all(multi_handle));
printf("Starting timer, expects to run for %ldus\n", RUN_FOR_THIS_LONG);
timer_start();
break;
case 0:
timeouts++;
- curl_multi_socket(multi_handle, CURL_SOCKET_TIMEOUT, socket_callback,
- NULL);
+ curl_multi_socket(multi_handle, CURL_SOCKET_TIMEOUT);
break;
default:
timer_continue();
if(act & CURL_POLL_OUT)
act--;
- curl_multi_socket(multi_handle, fdp->sockfd, socket_callback, NULL);
+ curl_multi_socket(multi_handle, fdp->sockfd);
timer_pause();
}
}