Skip to content

Commit

Permalink
curl_multi_wait: set revents for extra fds
Browse files Browse the repository at this point in the history
Pass back the revents that happened for the user-provided file
descriptors.
  • Loading branch information
TurnaevEvgeny authored and bagder committed Jul 17, 2013
1 parent 1122067 commit 6d30f8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ CURLMcode curl_multi_wait(CURLM *multi_handle,
struct Curl_one_easy *easy;
curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
int bitmap;
unsigned int i;
unsigned int i, j;
unsigned int nfds = 0;
unsigned int curlfds;
struct pollfd *ufds = NULL;
Expand Down Expand Up @@ -910,6 +910,9 @@ CURLMcode curl_multi_wait(CURLM *multi_handle,
else
i = 0;

for(j = nfds - extra_nfds; j < nfds; j++)
extra_fds[j].revents = ufds[j].revents;

Curl_safefree(ufds);
if(ret)
*ret = i;
Expand Down

0 comments on commit 6d30f8e

Please sign in to comment.