apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1829962 - /apr/apr/trunk/file_io/win32/buffer.c
Date Tue, 24 Apr 2018 07:14:11 GMT
Author: mturk
Date: Tue Apr 24 07:14:11 2018
New Revision: 1829962

URL: http://svn.apache.org/viewvc?rev=1829962&view=rev
Log:
Unlock mutex only if APR_FOPEN_XTHREAD flag is set

Modified:
    apr/apr/trunk/file_io/win32/buffer.c

Modified: apr/apr/trunk/file_io/win32/buffer.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/buffer.c?rev=1829962&r1=1829961&r2=1829962&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/buffer.c (original)
+++ apr/apr/trunk/file_io/win32/buffer.c Tue Apr 24 07:14:11 2018
@@ -31,7 +31,9 @@ APR_DECLARE(apr_status_t) apr_file_buffe
         /* Flush the existing buffer */
         rv = apr_file_flush(file);
         if (rv != APR_SUCCESS) {
-            apr_thread_mutex_unlock(file->mutex);
+            if (file->flags & APR_FOPEN_XTHREAD) {
+                apr_thread_mutex_unlock(file->mutex);
+            }
             return rv;
         }
     }



Mime
View raw message