Commit: 936553d666405bc783511979b17d78d51905b9cd Author: Pierrick Charron <pierr...@php.net> Fri, 28 Sep 2012 15:19:03 -0400 Parents: 4358e90a8f4fc7b3eaf6f42315b5d71b953391c6 Branches: PHP-5.3 PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=936553d666405bc783511979b17d78d51905b9cd Log: FD_ZERO file descriptors before calling curl_multi_fdset As per curl documentation http://curl.haxx.se/libcurl/c/curl_multi_fdset.html we need to FD_ZERO file descriptors before calling the curl_multi_fdset function Changed paths: M ext/curl/streams.c Diff: diff --git a/ext/curl/streams.c b/ext/curl/streams.c index 4f97ee0..e317285 100644 --- a/ext/curl/streams.c +++ b/ext/curl/streams.c @@ -162,6 +162,10 @@ static size_t php_curl_stream_read(php_stream *stream, char *buf, size_t count T } do { + FD_ZERO(&curlstream->readfds); + FD_ZERO(&curlstream->writefds); + FD_ZERO(&curlstream->excfds); + /* get the descriptors from curl */ curl_multi_fdset(curlstream->multi, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &curlstream->maxfd); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php