apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1334722 - in /apr/apr/branches/1.5.x: ./ file_io/unix/seek.c
Date Sun, 06 May 2012 18:02:06 GMT
Author: sf
Date: Sun May  6 18:02:06 2012
New Revision: 1334722

URL: http://svn.apache.org/viewvc?rev=1334722&view=rev
Log:
Merge r1044447:

apr_file_trunc(): Don't leave the file locked if flushing fails

Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/file_io/unix/seek.c

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1044447

Modified: apr/apr/branches/1.5.x/file_io/unix/seek.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/file_io/unix/seek.c?rev=1334722&r1=1334721&r2=1334722&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/file_io/unix/seek.c (original)
+++ apr/apr/branches/1.5.x/file_io/unix/seek.c Sun May  6 18:02:06 2012
@@ -117,10 +117,10 @@ apr_status_t apr_file_trunc(apr_file_t *
             /* Reset buffer positions for write mode */
             fp->bufpos = fp->direction = fp->dataRead = 0;
         }
+        file_unlock(fp);
         if (rc) {
             return rc;
         }
-        file_unlock(fp);
     }
     if (ftruncate(fp->filedes, offset) == -1) {
         return errno;



Mime
View raw message