hi Ilia,

NEWS? :)

thanks for your work!

On Mon, Feb 23, 2009 at 4:58 PM, Ilia Alshanetsky <il...@php.net> wrote:
> iliaa           Mon Feb 23 15:58:19 2009 UTC
>
>  Modified files:              (Branch: PHP_5_3)
>    /php-src/ext/curl   streams.c
>  Log:
>
>  Fixed bug #47477 (php_curl_stream_read() unnecessarily sleeps 15 secs under
>  heavy load)
>
>  # Patch by giuseppe bonacci
>
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/curl/streams.c?r1=1.14.2.2.2.11.2.3&r2=1.14.2.2.2.11.2.4&diff_format=u
> Index: php-src/ext/curl/streams.c
> diff -u php-src/ext/curl/streams.c:1.14.2.2.2.11.2.3 
> php-src/ext/curl/streams.c:1.14.2.2.2.11.2.4
> --- php-src/ext/curl/streams.c:1.14.2.2.2.11.2.3        Wed Dec 31 11:15:35 
> 2008
> +++ php-src/ext/curl/streams.c  Mon Feb 23 15:58:19 2009
> @@ -16,7 +16,7 @@
>    +----------------------------------------------------------------------+
>  */
>
> -/* $Id: streams.c,v 1.14.2.2.2.11.2.3 2008/12/31 11:15:35 sebastian Exp $ */
> +/* $Id: streams.c,v 1.14.2.2.2.11.2.4 2009/02/23 15:58:19 iliaa Exp $ */
>
>  /* This file implements cURL based wrappers.
>  * NOTE: If you are implementing your own streams that are intended to
> @@ -169,7 +169,8 @@
>                        tv.tv_sec = 15; /* TODO: allow this to be configured 
> from the script */
>
>                        /* wait for data */
> -                       switch (select(curlstream->maxfd + 1, 
> &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &tv)) {
> +                       switch ((curlstream->maxfd < 0) ? 1 :
> +                                       select(curlstream->maxfd + 1, 
> &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &tv)) {
>                                case -1:
>                                        /* error */
>                                        return 0;
> @@ -182,7 +183,8 @@
>                                                curlstream->mcode = 
> curl_multi_perform(curlstream->multi, &curlstream->pending);
>                                        } while (curlstream->mcode == 
> CURLM_CALL_MULTI_PERFORM);
>                        }
> -               } while (curlstream->readbuffer.readpos >= 
> curlstream->readbuffer.writepos && curlstream->pending > 0);
> +               } while (curlstream->maxfd >= 0 &&
> +                               curlstream->readbuffer.readpos >= 
> curlstream->readbuffer.writepos && curlstream->pending > 0);
>
>        }
>
>
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to