From: Ilia Alshanetsky Date: Mon, 18 Jan 2010 12:50:08 +0000 (+0000) Subject: Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams). X-Git-Tag: php-5.2.13RC1~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59dbdbf89da095208ae916e8e00ee3b9ebd34f71;p=php Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams). --- diff --git a/NEWS b/NEWS index 1e3003a967..5eaf12ca01 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ PHP NEWS - Fixed build of mysqli with MySQL 5.5.0-m2. (Andrey) +- Fixed bug #50787 (stream_set_write_buffer() has no effect on socket + streams). (vnegrier at optilian dot com, Ilia) - Fixed bug #50761 (system.multiCall crashes in xmlrpc extension). (hiroaki dot kawai at gmail dot com, Ilia) - Fixed bug #50732 (exec() adds single byte twice to $output array). (Ilia) diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index fcf6f3f8c6..a70f0ebd8c 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -396,6 +396,10 @@ static int php_sockop_set_option(php_stream *stream, int option, int value, void } #endif + case PHP_STREAM_OPTION_WRITE_BUFFER: + php_stream_set_chunk_size(stream, (ptrparam ? *(size_t *)ptrparam : PHP_SOCK_CHUNK_SIZE)); + return PHP_STREAM_OPTION_RETURN_OK; + default: return PHP_STREAM_OPTION_RETURN_NOTIMPL; }