apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r385629 - in /apr/apr/branches/0.9.x/file_io/win32: filestat.c open.c readwrite.c seek.c
Date Mon, 13 Mar 2006 19:31:44 GMT
Author: wrowe
Date: Mon Mar 13 11:31:42 2006
New Revision: 385629

URL: http://svn.apache.org/viewcvs?rev=385629&view=rev
Log:

  Similar to the patches for unix/netware/os - percolate the
  flush response code upwards to the caller, and note some
  mutex-unprotected flushes on win32

Backports: 385626

Modified:
    apr/apr/branches/0.9.x/file_io/win32/filestat.c
    apr/apr/branches/0.9.x/file_io/win32/open.c
    apr/apr/branches/0.9.x/file_io/win32/readwrite.c
    apr/apr/branches/0.9.x/file_io/win32/seek.c

Modified: apr/apr/branches/0.9.x/file_io/win32/filestat.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/file_io/win32/filestat.c?rev=385629&r1=385628&r2=385629&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/file_io/win32/filestat.c (original)
+++ apr/apr/branches/0.9.x/file_io/win32/filestat.c Mon Mar 13 11:31:42 2006
@@ -375,6 +375,7 @@
     BY_HANDLE_FILE_INFORMATION FileInfo;
 
     if (thefile->buffered) {
+        /* XXX: flush here is not mutex protected */
         apr_status_t rv = apr_file_flush(thefile);
         if (rv != APR_SUCCESS)
             return rv;

Modified: apr/apr/branches/0.9.x/file_io/win32/open.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/file_io/win32/open.c?rev=385629&r1=385628&r2=385629&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/file_io/win32/open.c (original)
+++ apr/apr/branches/0.9.x/file_io/win32/open.c Mon Mar 13 11:31:42 2006
@@ -242,6 +242,7 @@
         }
 
         if (file->buffered) {
+            /* XXX: flush here is not mutex protected */
             flush_rv = apr_file_flush((apr_file_t *)thefile);
         }
         CloseHandle(file->filehand);

Modified: apr/apr/branches/0.9.x/file_io/win32/readwrite.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/file_io/win32/readwrite.c?rev=385629&r1=385628&r2=385629&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/file_io/win32/readwrite.c (original)
+++ apr/apr/branches/0.9.x/file_io/win32/readwrite.c Mon Mar 13 11:31:42 2006
@@ -169,7 +169,11 @@
         apr_thread_mutex_lock(thefile->mutex);
 
         if (thefile->direction == 1) {
-            apr_file_flush(thefile);
+            rv = apr_file_flush(thefile);
+            if (rv != APR_SUCCESS) {
+                apr_thread_mutex_unlock(thefile->mutex);
+                return rv;
+            }
             thefile->bufpos = 0;
             thefile->direction = 0;
             thefile->dataRead = 0;

Modified: apr/apr/branches/0.9.x/file_io/win32/seek.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/file_io/win32/seek.c?rev=385629&r1=385628&r2=385629&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/file_io/win32/seek.c (original)
+++ apr/apr/branches/0.9.x/file_io/win32/seek.c Mon Mar 13 11:31:42 2006
@@ -22,10 +22,14 @@
 static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
 {
     apr_off_t newbufpos;
+    apr_status_t rv;
     DWORD rc;
 
     if (thefile->direction == 1) {
-        apr_file_flush(thefile);
+        /* XXX: flush here is not mutex protected */
+        rv = apr_file_flush(thefile);
+        if (rv != APR_SUCCESS)
+            return rv;
         thefile->bufpos = thefile->direction = thefile->dataRead = 0;
     }
 



Mime
View raw message