aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvgeny Turnaev <turnaev.e@gmail.com>2013-07-18 00:06:09 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-07-18 00:06:09 +0200
commit6d30f8ebed34e7276c2a59ee20d466bff17fee56 (patch)
tree2695899ff5df1ca6aafa15a6655241de70ce09e1 /lib
parent11220678c4b78dfb209797b8537df40638d9dfe3 (diff)
curl_multi_wait: set revents for extra fds
Pass back the revents that happened for the user-provided file descriptors.
Diffstat (limited to 'lib')
-rw-r--r--lib/multi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 09a5b2d8b..dee2356ca 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -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;
@@ -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;