]> granicus.if.org Git - php/commitdiff
the apache 1.x sapi read_posts tests for SG(read_post_bytes) being
authorHartmut Holzgraefe <hholzgra@php.net>
Thu, 21 Nov 2002 10:29:11 +0000 (10:29 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Thu, 21 Nov 2002 10:29:11 +0000 (10:29 +0000)
counted up, so lets make it happy although this value is not really
needed in these cases ...

ext/standard/php_fopen_wrapper.c
main/SAPI.c

index 5d40a5a9aaf9d0ff9f4f5e66396f3ea8d645d8af..27230602a3fa84c01b989f363fb6d93a61ef8ea4 100644 (file)
@@ -96,6 +96,7 @@ static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count
                }
        }
 
+       SG(read_post_bytes) += read_bytes;
     return read_bytes;
 }
 
index 91186311dbcee0ee1f4d1a10f2c6f47a3e218406..fd9b089bc58c7b3820a9cc3216a0fd2e6a2343b4 100644 (file)
@@ -390,8 +390,10 @@ SAPI_API void sapi_deactivate(TSRMLS_D)
                if(sapi_module.read_post) { 
                        /* make sure we've consumed all request input data */
                        char dummy[SAPI_POST_BLOCK_SIZE];
-                       while(sapi_module.read_post(dummy, sizeof(dummy)-1 TSRMLS_CC) > 0) {
-                               /* empty loop body */
+                       int read_bytes;
+
+                       while((read_bytes = sapi_module.read_post(dummy, sizeof(dummy)-1 TSRMLS_CC)) > 0) {
+                               SG(read_post_bytes) += read_bytes;
                        }
                }
        }