apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r384941 - in /apr/apr/trunk/file_io/os2: filestat.c open.c readwrite.c seek.c
Date Fri, 10 Mar 2006 22:55:51 GMT
Author: wrowe
Date: Fri Mar 10 14:55:49 2006
New Revision: 384941

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

  Identify - one 2Xtransformed error result, several missing mutex sections
  and fix one last apr_file_flush result ignored (close the file, but return
  the failure to flush error.)

Modified:
    apr/apr/trunk/file_io/os2/filestat.c
    apr/apr/trunk/file_io/os2/open.c
    apr/apr/trunk/file_io/os2/readwrite.c
    apr/apr/trunk/file_io/os2/seek.c

Modified: apr/apr/trunk/file_io/os2/filestat.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/os2/filestat.c?rev=384941&r1=384940&r2=384941&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/filestat.c (original)
+++ apr/apr/trunk/file_io/os2/filestat.c Fri Mar 10 14:55:49 2006
@@ -94,6 +94,7 @@
 
     if (thefile->isopen) {
         if (thefile->buffered) {
+            /* XXX: flush here is not mutex protected */
             apr_status_t rv = apr_file_flush(thefile);
 
             if (rv != APR_SUCCESS) {

Modified: apr/apr/trunk/file_io/os2/open.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/os2/open.c?rev=384941&r1=384940&r2=384941&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/open.c (original)
+++ apr/apr/trunk/file_io/os2/open.c Fri Mar 10 14:55:49 2006
@@ -121,16 +121,19 @@
     apr_status_t status;
     
     if (file && file->isopen) {
-        apr_file_flush(file);
+        /* XXX: flush here is not mutex protected */
+        status = apr_file_flush(file);
         rc = DosClose(file->filedes);
     
         if (rc == 0) {
             file->isopen = FALSE;
-            status = APR_SUCCESS;
 
             if (file->flags & APR_DELONCLOSE) {
                 status = APR_FROM_OS_ERROR(DosDelete(file->fname));
             }
+            /* else we return the status of the flush attempt 
+             * when all else succeeds
+             */
         } else {
             return APR_FROM_OS_ERROR(rc);
         }

Modified: apr/apr/trunk/file_io/os2/readwrite.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/os2/readwrite.c?rev=384941&r1=384940&r2=384941&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/readwrite.c (original)
+++ apr/apr/trunk/file_io/os2/readwrite.c Fri Mar 10 14:55:49 2006
@@ -150,6 +150,7 @@
 
         while (rc == 0 && size > 0) {
             if (thefile->bufpos == thefile->bufsize)   // write buffer is full
+                /* XXX bug; - rc is double-transformed os->apr below */
                 rc = apr_file_flush(thefile);
 
             blocksize = size > thefile->bufsize - thefile->bufpos ? thefile->bufsize
- thefile->bufpos : size;

Modified: apr/apr/trunk/file_io/os2/seek.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/os2/seek.c?rev=384941&r1=384940&r2=384941&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/seek.c (original)
+++ apr/apr/trunk/file_io/os2/seek.c Fri Mar 10 14:55:49 2006
@@ -27,6 +27,7 @@
     ULONG rc;
 
     if (thefile->direction == 1) {
+        /* XXX: flush here is not mutex protected */
         apr_status_t rv = apr_file_flush(thefile);
 
         if (rv != APR_SUCCESS) {



Mime
View raw message