mirror of
https://github.com/curl/curl.git
synced 2026-07-28 01:33:11 +03:00
curl_multi_wait: set revents for extra fds
Pass back the revents that happened for the user-provided file descriptors.
This commit is contained in:
parent
11220678c4
commit
6d30f8ebed
1 changed files with 4 additions and 1 deletions
|
|
@ -808,7 +808,7 @@ CURLMcode curl_multi_wait(CURLM *multi_handle,
|
||||||
struct Curl_one_easy *easy;
|
struct Curl_one_easy *easy;
|
||||||
curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
|
curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
|
||||||
int bitmap;
|
int bitmap;
|
||||||
unsigned int i;
|
unsigned int i, j;
|
||||||
unsigned int nfds = 0;
|
unsigned int nfds = 0;
|
||||||
unsigned int curlfds;
|
unsigned int curlfds;
|
||||||
struct pollfd *ufds = NULL;
|
struct pollfd *ufds = NULL;
|
||||||
|
|
@ -910,6 +910,9 @@ CURLMcode curl_multi_wait(CURLM *multi_handle,
|
||||||
else
|
else
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
|
for(j = nfds - extra_nfds; j < nfds; j++)
|
||||||
|
extra_fds[j].revents = ufds[j].revents;
|
||||||
|
|
||||||
Curl_safefree(ufds);
|
Curl_safefree(ufds);
|
||||||
if(ret)
|
if(ret)
|
||||||
*ret = i;
|
*ret = i;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue