diff options
| author | Hannes Magnusson <bjori@php.net> | 2008-04-14 12:16:07 +0000 |
|---|---|---|
| committer | Hannes Magnusson <bjori@php.net> | 2008-04-14 12:16:07 +0000 |
| commit | 72080950ab9fb13c9866d3a7bb42f391e3dda9d9 (patch) | |
| tree | 92eeefbd41d4de81b9b6f9b7f036155ebf42ba4b /ext/openssl/xp_ssl.c | |
| parent | ef78497f7822126b06175e3941e6ea04d74619e1 (diff) | |
| download | php-git-72080950ab9fb13c9866d3a7bb42f391e3dda9d9.tar.gz | |
Fixed bug#44716 (Progress notifications incorrect)
Diffstat (limited to 'ext/openssl/xp_ssl.c')
| -rw-r--r-- | ext/openssl/xp_ssl.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index ef109d5c65..d1d97940bf 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -198,14 +198,13 @@ static size_t php_openssl_sockop_write(php_stream *stream, const char *buf, size 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 @@ static size_t php_openssl_sockop_read(php_stream *stream, char *buf, size_t coun 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; } |
