summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2010-01-18 12:50:08 +0000
committerIlia Alshanetsky <iliaa@php.net>2010-01-18 12:50:08 +0000
commit7e1f29e930bfa26b8de04862556e1c49fc91eda7 (patch)
tree309211c7fafebb3f2a4a63eadacef8ebfff6622b
parentebe5ff73f8809b35791dcd9a8c940a15bde4d807 (diff)
downloadphp-git-7e1f29e930bfa26b8de04862556e1c49fc91eda7.tar.gz
Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams).
-rw-r--r--NEWS2
-rw-r--r--main/streams/xp_socket.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index ca1ac688be..51dbfbf969 100644
--- 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)
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c
index a71ba924d4..7d993f11a6 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -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;
}