summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Frederic Clere <jfclere@apache.org>2018-06-27 15:21:19 +0000
committerJean-Frederic Clere <jfclere@apache.org>2018-06-27 15:21:19 +0000
commitf77f9a1d44c834c3ef8379daa04cbc45fd395e87 (patch)
treea7419288d70a2ac59c6716f94797f717be27672d
parentd5aedaeb28079d0e1bbf64e4cf145aeadce83b3d (diff)
downloadapr-f77f9a1d44c834c3ef8379daa04cbc45fd395e87.tar.gz
remove the wrong proposal in STATUS and commit a fix for my crash problems.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1834513 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--STATUS4
-rw-r--r--file_io/win32/buffer.c12
2 files changed, 9 insertions, 7 deletions
diff --git a/STATUS b/STATUS
index 037a9b2f9..ddae00c49 100644
--- a/STATUS
+++ b/STATUS
@@ -98,10 +98,6 @@ CURRENT VOTES:
1.5.x patch: http://people.apache.org/~jim/patches/apr-1.5-permset.patch
+1:
- * make sure we don't unlock mutex when we haven't locked it.
- 1.6.x patch: http://people.apache.org/~jfclere/patch.180618.txt
- +1 jfclere
-
CURRENT test/testall -v EXCEPTIONS:
Please add any platform anomilies to the following exception list.
diff --git a/file_io/win32/buffer.c b/file_io/win32/buffer.c
index 34e4e6393..479726535 100644
--- a/file_io/win32/buffer.c
+++ b/file_io/win32/buffer.c
@@ -23,13 +23,17 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
{
apr_status_t rv;
- apr_thread_mutex_lock(file->mutex);
+ if (file->mutex) {
+ apr_thread_mutex_lock(file->mutex);
+ }
if(file->buffered) {
/* Flush the existing buffer */
rv = apr_file_flush(file);
if (rv != APR_SUCCESS) {
- apr_thread_mutex_unlock(file->mutex);
+ if (file->mutex) {
+ apr_thread_mutex_unlock(file->mutex);
+ }
return rv;
}
}
@@ -48,7 +52,9 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
file->buffered = 0;
}
- apr_thread_mutex_unlock(file->mutex);
+ if (file->mutex) {
+ apr_thread_mutex_unlock(file->mutex);
+ }
return APR_SUCCESS;
}