httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Thu, 21 Feb 2002 17:20:26 GMT
wrowe       02/02/21 09:20:26

  Modified:    server   core.c
  Log:
    This code should be a noop today.  But I did not feel comfortable about
    reusing/recopying each bucket -after- inserting it into the brigade.
    Also, copying bucket c from b from a seemed obtuse.
  
    This patch creates the single bucket, makes a copy of it for each
    sendfile chunk we are about to add to the brigade, and finally consumes
    that initial bucket as the final file bucket of the brigade.
  
  Revision  Changes    Path
  1.151     +3 -2      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- core.c	21 Feb 2002 02:19:39 -0000	1.150
  +++ core.c	21 Feb 2002 17:20:26 -0000	1.151
  @@ -3103,8 +3103,9 @@
           apr_off_t fsize = r->finfo.size;
           e = apr_bucket_file_create(fd, 0, AP_MAX_SENDFILE, r->pool);
           while (fsize > AP_MAX_SENDFILE) {
  -            APR_BRIGADE_INSERT_TAIL(bb, e);
  -            apr_bucket_copy(e, &e);
  +            apr_bucket *ce;
  +            apr_bucket_copy(e, &ce);
  +            APR_BRIGADE_INSERT_TAIL(bb, ce);
               e->start += AP_MAX_SENDFILE;
               fsize -= AP_MAX_SENDFILE;
           }
  
  
  

Mime
View raw message