]> granicus.if.org Git - php/commitdiff
Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 18 Jan 2010 12:50:08 +0000 (12:50 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 18 Jan 2010 12:50:08 +0000 (12:50 +0000)
NEWS
main/streams/xp_socket.c

diff --git a/NEWS b/NEWS
index 1e3003a9679a99e3b866f87474cf1b58d6015ba6..5eaf12ca01735351cfd4c35f3ef0db3b4faeca98 100644 (file)
--- 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)
index fcf6f3f8c6ea87e099e88e7689fbd35fd83a15fc..a70f0ebd8c1a1fd777c09f69b1b3b11cb6c00be9 100644 (file)
@@ -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;
                        }