mike Wed Aug 30 12:07:04 2006 UTC
Modified files:
/php-src/ext/zlib zlib.c
Log:
- avoid a loop around deflate() by using Z_SYNC_FLUSH for standard write
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/zlib.c?r1=1.205&r2=1.206&diff_format=u
Index: php-src/ext/zlib/zlib.c
diff -u php-src/ext/zlib/zlib.c:1.205 php-src/ext/zlib/zlib.c:1.206
--- php-src/ext/zlib/zlib.c:1.205 Wed Aug 30 07:42:02 2006
+++ php-src/ext/zlib/zlib.c Wed Aug 30 12:07:04 2006
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zlib.c,v 1.205 2006/08/30 07:42:02 mike Exp $ */
+/* $Id: zlib.c,v 1.206 2006/08/30 12:07:04 mike Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -89,7 +89,7 @@
int php_zlib_output_handler(void **handler_context, php_output_context
*output_context)
{
php_zlib_context *ctx = *(php_zlib_context **) handler_context;
- int flags = Z_NO_FLUSH, level;
+ int flags = Z_SYNC_FLUSH, status;
PHP_OUTPUT_TSRMLS(output_context);
if (!php_zlib_output_encoding(TSRMLS_C)) {
@@ -147,10 +147,10 @@
if (output_context->op & PHP_OUTPUT_HANDLER_FINAL) {
flags = Z_FINISH;
} else if (output_context->op & PHP_OUTPUT_HANDLER_FLUSH) {
- flags = Z_SYNC_FLUSH;
+ flags = Z_FULL_FLUSH;
}
- switch (deflate(&ctx->Z, flags)) {
+ switch ((status = deflate(&ctx->Z, flags))) {
case Z_OK:
if (flags == Z_FINISH) {
deflateEnd(&ctx->Z);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php