Loading lib/multi.c +32 −23 Original line number Diff line number Diff line Loading @@ -802,7 +802,8 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE]; int bitmap; unsigned int i; unsigned int nfds = extra_nfds; unsigned int nfds = 0; unsigned int curlfds; struct pollfd *ufds = NULL; if(!GOOD_MULTI_HANDLE(multi)) Loading Loading @@ -832,6 +833,9 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, easy = easy->next; /* check next handle */ } curlfds = nfds; /* number of internal file descriptors */ nfds += extra_nfds; /* add the externally provided ones */ if(nfds) { ufds = malloc(nfds * sizeof(struct pollfd)); if(!ufds) Loading @@ -839,6 +843,10 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, } nfds = 0; /* only do the second loop if we found descriptors in the first stage run above */ if(curlfds) { /* Add the curl handles to our pollfds first */ easy=multi->easy.next; while(easy != &multi->easy) { Loading Loading @@ -866,6 +874,7 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, easy = easy->next; /* check next handle */ } } /* Add external file descriptions from poll-like struct curl_waitfd */ for(i = 0; i < extra_nfds; i++) { Loading Loading
lib/multi.c +32 −23 Original line number Diff line number Diff line Loading @@ -802,7 +802,8 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE]; int bitmap; unsigned int i; unsigned int nfds = extra_nfds; unsigned int nfds = 0; unsigned int curlfds; struct pollfd *ufds = NULL; if(!GOOD_MULTI_HANDLE(multi)) Loading Loading @@ -832,6 +833,9 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, easy = easy->next; /* check next handle */ } curlfds = nfds; /* number of internal file descriptors */ nfds += extra_nfds; /* add the externally provided ones */ if(nfds) { ufds = malloc(nfds * sizeof(struct pollfd)); if(!ufds) Loading @@ -839,6 +843,10 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, } nfds = 0; /* only do the second loop if we found descriptors in the first stage run above */ if(curlfds) { /* Add the curl handles to our pollfds first */ easy=multi->easy.next; while(easy != &multi->easy) { Loading Loading @@ -866,6 +874,7 @@ CURLMcode curl_multi_wait(CURLM *multi_handle, easy = easy->next; /* check next handle */ } } /* Add external file descriptions from poll-like struct curl_waitfd */ for(i = 0; i < extra_nfds; i++) { Loading