]> 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 ca1ac688bef4a6a2da89840febda137ade92259c..51dbfbf9695b131f2bd7984686b7c47fb4e58444 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@ PHP                                                                        NEWS
 - Added stream filter support to mcrypt extension (ported from 
   mcrypt_filter). (Stas)
 
+- 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 a71ba924d451024c34a9edc830ec611613646f59..7d993f11a627079639c78bf6256ad179383b4213 100644 (file)
@@ -400,6 +400,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;
                        }