summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjfclere <jfclere@13f79535-47bb-0310-9956-ffa450edef68>2018-06-27 15:21:19 +0000
committerjfclere <jfclere@13f79535-47bb-0310-9956-ffa450edef68>2018-06-27 15:21:19 +0000
commit57eeaa3614bd924f2291b015cb57441f52e9bb0a (patch)
treea7419288d70a2ac59c6716f94797f717be27672d
parent6771f61c33e46198b2fd5de6e000f09e8f791515 (diff)
downloadlibapr-57eeaa3614bd924f2291b015cb57441f52e9bb0a.tar.gz
remove the wrong proposal in STATUS and commit a fix for my crash problems.
git-svn-id: http://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;
}