summaryrefslogtreecommitdiff
path: root/ext/openssl
diff options
context:
space:
mode:
authorHannes Magnusson <bjori@php.net>2008-05-07 20:01:56 +0000
committerHannes Magnusson <bjori@php.net>2008-05-07 20:01:56 +0000
commitfa6ab4ca82d08c1c55a4c4ccad215e62a599f7a3 (patch)
treed0a89fe148292c1755f9347a61bd3cbeda6763e2 /ext/openssl
parentfc4cfc3c839b1f4b1cae89f2ce2673ac0778fe7f (diff)
downloadphp-git-fa6ab4ca82d08c1c55a4c4ccad215e62a599f7a3.tar.gz
MFH: Fixed bug #44716 (Progress notifications incorrect)
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/xp_ssl.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 50dbbb911a..e0d6e3c475 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;
}