summaryrefslogtreecommitdiff
path: root/file_io/win32/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'file_io/win32/buffer.c')
-rw-r--r--file_io/win32/buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/file_io/win32/buffer.c b/file_io/win32/buffer.c
index 479726535..a32016255 100644
--- a/file_io/win32/buffer.c
+++ b/file_io/win32/buffer.c
@@ -23,7 +23,7 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
{
apr_status_t rv;
- if (file->mutex) {
+ if (thefile->flags & APR_FOPEN_XTHREAD) {
apr_thread_mutex_lock(file->mutex);
}
@@ -31,7 +31,7 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
/* Flush the existing buffer */
rv = apr_file_flush(file);
if (rv != APR_SUCCESS) {
- if (file->mutex) {
+ if (thefile->flags & APR_FOPEN_XTHREAD) {
apr_thread_mutex_unlock(file->mutex);
}
return rv;
@@ -52,7 +52,7 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
file->buffered = 0;
}
- if (file->mutex) {
+ if (thefile->flags & APR_FOPEN_XTHREAD) {
apr_thread_mutex_unlock(file->mutex);
}