httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: cvs commit: apache-2.0/src/main http_core.c
Date Tue, 10 Oct 2000 01:52:30 GMT
stoddard@locus.apache.org writes:

> stoddard    00/10/09 11:02:46
> 
>   Modified:    src/main http_core.c
>   Log:
>   Initialize nbytes across each iteration and not just after a call to writev_it_all.
>   
>   Revision  Changes    Path
>   1.154     +2 -2      apache-2.0/src/main/http_core.c
>   
>   Index: http_core.c
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
>   retrieving revision 1.153
>   retrieving revision 1.154
>   diff -u -r1.153 -r1.154
>   --- http_core.c	2000/10/09 16:35:20	1.153
>   +++ http_core.c	2000/10/09 18:02:45	1.154
>   @@ -3322,7 +3322,7 @@
>    {
>        apr_status_t rv;
>        ap_bucket_brigade *more = NULL;
>   -    apr_ssize_t bytes_sent = 0, nbytes = 0;
>   +    apr_ssize_t bytes_sent = 0, nbytes;
>        ap_bucket *e;
>        conn_rec *c = f->c;
>    
>   @@ -3352,6 +3352,7 @@
>    
>        /* Iterate over the brigade collecting iovecs */
>        while (b) {
>   +        nbytes = 0; /* in case more points to another brigade */
>            more = NULL;
>            AP_BRIGADE_FOREACH(e, b) {
>                if (e->type == AP_BUCKET_EOS) {
>   @@ -3447,7 +3448,6 @@
>                rv = writev_it_all(c->client->bsock, 
>                                   vec, nvec, 
>                                   nbytes, &bytes_sent);
>   -            nbytes = 0; /* in case more points to another brigade */
>            }
>    
>            ap_brigade_destroy(b);

But there were one or two iterations (no more, no less), so code is
effectively the same, right?

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message