pajoye Tue, 18 May 2010 19:39:39 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=299466
Log: - #51854, fix logic (patch by Tjerk) Bug: http://bugs.php.net/51854 (Open) stream_set_read_buffer() not working as expected Changed paths: U php/php-src/branches/PHP_5_3/main/streams/streams.c U php/php-src/trunk/main/streams/streams.c Modified: php/php-src/branches/PHP_5_3/main/streams/streams.c =================================================================== --- php/php-src/branches/PHP_5_3/main/streams/streams.c 2010-05-18 18:45:12 UTC (rev 299465) +++ php/php-src/branches/PHP_5_3/main/streams/streams.c 2010-05-18 19:39:39 UTC (rev 299466) @@ -1186,7 +1186,7 @@ /* try to match the buffer mode as best we can */ if (value == PHP_STREAM_BUFFER_NONE) { stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; - } else { + } else if (stream->flags & PHP_STREAM_FLAG_NO_BUFFER) { stream->flags ^= PHP_STREAM_FLAG_NO_BUFFER; } ret = PHP_STREAM_OPTION_RETURN_OK; Modified: php/php-src/trunk/main/streams/streams.c =================================================================== --- php/php-src/trunk/main/streams/streams.c 2010-05-18 18:45:12 UTC (rev 299465) +++ php/php-src/trunk/main/streams/streams.c 2010-05-18 19:39:39 UTC (rev 299466) @@ -1186,7 +1186,7 @@ /* try to match the buffer mode as best we can */ if (value == PHP_STREAM_BUFFER_NONE) { stream->flags |= PHP_STREAM_FLAG_NO_BUFFER; - } else { + } else if (stream->flags & PHP_STREAM_FLAG_NO_BUFFER) { stream->flags ^= PHP_STREAM_FLAG_NO_BUFFER; } ret = PHP_STREAM_OPTION_RETURN_OK;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php