httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/file_io/unix open.c
Date Tue, 27 Jun 2000 01:26:15 GMT
trawick     00/06/26 18:26:15

  Modified:    src      CHANGES
               src/lib/apr/file_io/unix open.c
  Log:
  ap_close() now calls ap_flush() for buffered files, so write
  operations work a whole lot better on buffered files :)
  
  Revision  Changes    Path
  1.165     +4 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.164
  retrieving revision 1.165
  diff -u -r1.164 -r1.165
  --- CHANGES	2000/06/21 13:15:25	1.164
  +++ CHANGES	2000/06/27 01:26:14	1.165
  @@ -1,4 +1,8 @@
   Changes with Apache 2.0a5
  +  *) ap_close() now calls ap_flush() for buffered files, so write
  +     operations work a whole lot better on buffered files.
  +     [Jeff Trawick]
  +
     *) Fix error messages issued from MPMs which explain where to change
        compiled-in limits (e.g., ThreadsPerChild, MaxClients, StartTreads).
        [Greg Ames]
  
  
  
  1.59      +7 -3      apache-2.0/src/lib/apr/file_io/unix/open.c
  
  Index: open.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/open.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- open.c	2000/06/20 19:36:24	1.58
  +++ open.c	2000/06/27 01:26:15	1.59
  @@ -172,13 +172,17 @@
   
   ap_status_t ap_close(ap_file_t *file)
   {
  -    ap_status_t rv;
  -  
  +    ap_status_t flush_rv = APR_SUCCESS, rv;
  +
  +    if (file->buffered) {
  +        flush_rv = ap_flush(file);
  +    }
  +
       if ((rv = ap_unix_file_cleanup(file)) == APR_SUCCESS) {
           ap_kill_cleanup(file->cntxt, file, ap_unix_file_cleanup);
           return APR_SUCCESS;
       }
  -    return rv;
  +    return rv ? rv : flush_rv;
   }
   
   ap_status_t ap_remove_file(const char *path, ap_pool_t *cont)
  
  
  

Mime
View raw message