bjori           Wed May  7 20:01:56 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/openssl        xp_ssl.c 
  Log:
  MFH: Fixed bug #44716 (Progress notifications incorrect)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/xp_ssl.c?r1=1.22.2.3.2.11&r2=1.22.2.3.2.12&diff_format=u
Index: php-src/ext/openssl/xp_ssl.c
diff -u php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.11 
php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.12
--- php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.11  Tue Apr  8 14:11:49 2008
+++ php-src/ext/openssl/xp_ssl.c        Wed May  7 20:01:56 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: xp_ssl.c,v 1.22.2.3.2.11 2008/04/08 14:11:49 jorton Exp $ */
+/* $Id: xp_ssl.c,v 1.22.2.3.2.12 2008/05/07 20:01:56 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

Reply via email to