You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by sf...@apache.org on 2012/05/06 20:02:06 UTC

svn commit: r1334722 - in /apr/apr/branches/1.5.x: ./ file_io/unix/seek.c

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;