apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/file_io/unix filestat.c
Date Thu, 06 Mar 2003 09:21:25 GMT
jorton      2003/03/06 01:21:25

  Modified:    file_io/unix filestat.c
  Log:
  Fix the 'test_buffered_write_size' test by ensuring that buffered
  files are flushed before calling fstat.
  
  Revision  Changes    Path
  1.65      +6 -0      apr/file_io/unix/filestat.c
  
  Index: filestat.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/unix/filestat.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- filestat.c	7 Jan 2003 00:52:53 -0000	1.64
  +++ filestat.c	6 Mar 2003 09:21:24 -0000	1.65
  @@ -131,6 +131,12 @@
   {
       struct stat info;
   
  +    if (thefile->buffered) {
  +        apr_status_t rv = apr_file_flush(thefile);
  +        if (rv != APR_SUCCESS)
  +            return rv;
  +    }
  +
       if (fstat(thefile->filedes, &info) == 0) {
           finfo->pool = thefile->pool;
           finfo->fname = thefile->fname;
  
  
  

Mime
View raw message