|
Lines 336-343
Link Here
|
| 336 |
|| s->curl.multi_status == CURLM_OK)) { |
336 |
|| s->curl.multi_status == CURLM_OK)) { |
| 337 |
if (s->curl.multi_status != CURLM_CALL_MULTI_PERFORM) { |
337 |
if (s->curl.multi_status != CURLM_CALL_MULTI_PERFORM) { |
| 338 |
fd_set read_fds, write_fds, exc_fds; |
338 |
fd_set read_fds, write_fds, exc_fds; |
| 339 |
int max_fd; |
339 |
int max_fd, ret; |
| 340 |
int ret; |
340 |
long milliseconds; |
|
|
341 |
struct timeval timeout; |
| 341 |
|
342 |
|
| 342 |
logit ("Doing select()..."); |
343 |
logit ("Doing select()..."); |
| 343 |
|
344 |
|
|
Lines 356-363
Link Here
|
| 356 |
if (s->curl.wake_up_pipe[0] > max_fd) |
357 |
if (s->curl.wake_up_pipe[0] > max_fd) |
| 357 |
max_fd = s->curl.wake_up_pipe[0]; |
358 |
max_fd = s->curl.wake_up_pipe[0]; |
| 358 |
|
359 |
|
|
|
360 |
curl_multi_timeout (s->curl.multi_handle, &milliseconds); |
| 361 |
if (milliseconds <= 0) |
| 362 |
milliseconds = 1000; |
| 363 |
timeout.tv_sec = milliseconds / 1000; |
| 364 |
timeout.tv_usec = (milliseconds % 1000) * 1000; |
| 365 |
|
| 359 |
ret = select (max_fd + 1, &read_fds, &write_fds, |
366 |
ret = select (max_fd + 1, &read_fds, &write_fds, |
| 360 |
&exc_fds, NULL); |
367 |
&exc_fds, &timeout); |
| 361 |
|
368 |
|
| 362 |
if (ret < 0 && errno == EINTR) { |
369 |
if (ret < 0 && errno == EINTR) { |
| 363 |
logit ("Interrupted"); |
370 |
logit ("Interrupted"); |