]> 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)
main/streams/xp_socket.c

index c9fee01a5c6f22d3a3e7d120af90fc2a85b86e49..a84ceb64c2f34c7da7b63eb8540a363609a0d750 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;
                        }