bjori Mon Apr 14 12:17:38 2008 UTC Modified files: /php-src/ext/openssl xp_ssl.c Log: MFB53: Fixed bug#44716 (Progress notifications incorrect) http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/xp_ssl.c?r1=1.36&r2=1.37&diff_format=u Index: php-src/ext/openssl/xp_ssl.c diff -u php-src/ext/openssl/xp_ssl.c:1.36 php-src/ext/openssl/xp_ssl.c:1.37 --- php-src/ext/openssl/xp_ssl.c:1.36 Fri Apr 4 12:49:57 2008 +++ php-src/ext/openssl/xp_ssl.c Mon Apr 14 12:17:38 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xp_ssl.c,v 1.36 2008/04/04 12:49:57 jorton Exp $ */ +/* $Id: xp_ssl.c,v 1.37 2008/04/14 12:17:38 bjori Exp $ */ #include "php.h" #include "ext/standard/file.h" @@ -198,14 +198,13 @@ break; } } while(retry); - + + if (didwrite > 0) { + php_stream_notify_progress_increment(stream->context, didwrite, 0); + } } else { didwrite = php_stream_socket_ops.write(stream, buf, count TSRMLS_CC); } - - if (didwrite > 0) { - php_stream_notify_progress_increment(stream->context, didwrite, 0); - } if (didwrite < 0) { didwrite = 0; @@ -234,16 +233,16 @@ break; } } while (retry); + + if (nr_bytes > 0) { + php_stream_notify_progress_increment(stream->context, nr_bytes, 0); + } } else { nr_bytes = php_stream_socket_ops.read(stream, buf, count TSRMLS_CC); } - if (nr_bytes > 0) { - php_stream_notify_progress_increment(stream->context, nr_bytes, 0); - } - if (nr_bytes < 0) { nr_bytes = 0; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php