apr-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1334726&view=rev
Log:
Merge r1044447 and add CHANGES entry:

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

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

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

Modified: apr/apr/branches/1.4.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/CHANGES?rev=1334726&r1=1334725&r2=1334726&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.4.x/CHANGES [utf-8] Sun May  6 18:06:43 2012
@@ -1,6 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 1.4.7
 
+  *) Fix file not being unlocked if truncate call on a file fails.
+     [Mladen Turk]
+
   *) apr_mcast_hops: Fix EINVAL for IPv6 sockets caused by using byte
      instead integer for setsockopt. [Mladen Turk]
 

Modified: apr/apr/branches/1.4.x/file_io/unix/seek.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/file_io/unix/seek.c?rev=1334726&r1=1334725&r2=1334726&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/file_io/unix/seek.c (original)
+++ apr/apr/branches/1.4.x/file_io/unix/seek.c Sun May  6 18:06:43 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