aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSara Golemon <sgolemon@fb.com>2012-09-15 10:38:52 -0700
committerDaniel Stenberg <daniel@haxx.se>2012-09-16 19:58:02 +0200
commitb78944146a0670b74be00e189f468adfc5fca5b7 (patch)
tree5e466784b19e166a1600ec934df0c3e2643da4e6 /lib
parent9b25b00fa3c0d57c9356fbdcec9883a3cdd16c93 (diff)
curl_multi_wait: Add parameter to return number of active sockets
Minor change to recently introduced function. BC breaking, but since curl_multi_wait() doesn't exist in any releases that should be fine.
Diffstat (limited to 'lib')
-rw-r--r--lib/multi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 4a1f601f6..b6c327b77 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -944,7 +944,8 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
CURLMcode curl_multi_wait(CURLM *multi_handle,
struct curl_waitfd extra_fds[],
unsigned int extra_nfds,
- int timeout_ms)
+ int timeout_ms,
+ int *ret)
{
struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
struct Curl_one_easy *easy;
@@ -1023,8 +1024,10 @@ CURLMcode curl_multi_wait(CURLM *multi_handle,
}
/* wait... */
- Curl_poll(ufds, nfds, timeout_ms);
+ i = Curl_poll(ufds, nfds, timeout_ms);
free(ufds);
+ if(ret)
+ *ret = i;
return CURLM_OK;
}