summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--modules/mappers/mod_rewrite.c10
-rw-r--r--modules/mappers/mod_rewrite.h1
3 files changed, 8 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index 50d5a46c89..1ce239305f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
Changes with Apache 2.0.35
+ *) mod_rewrite: updated to use the new APR global mutex type.
+ [Aaron Bannert]
+
*) Fixes for mod_include errors on boundary conditions in which
"<!--#" occurs at the very end of a bucket
[Paul Reder, Brian Pane]
diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c
index 0e877c1a1b..83b7a8f258 100644
--- a/modules/mappers/mod_rewrite.c
+++ b/modules/mappers/mod_rewrite.c
@@ -188,7 +188,7 @@ static int proxy_available;
static const char *lockname;
static apr_global_mutex_t *rewrite_mapr_lock_acquire = NULL;
-static apr_lock_t *rewrite_log_lock = NULL;
+static apr_global_mutex_t *rewrite_log_lock = NULL;
/*
** +-------------------------------------------------------+
@@ -947,8 +947,8 @@ static int init_module(apr_pool_t *p,
proxy_available = (ap_find_linked_module("mod_proxy.c") != NULL);
/* create the rewriting lockfiles in the parent */
- if ((rv = apr_lock_create(&rewrite_log_lock, APR_MUTEX, APR_LOCKALL,
- APR_LOCK_DEFAULT, NULL, p)) != APR_SUCCESS) {
+ if ((rv = apr_global_mutex_create(&rewrite_log_lock, NULL,
+ APR_LOCK_DEFAULT, p)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
"mod_rewrite: could not create rewrite_log_lock");
return HTTP_INTERNAL_SERVER_ERROR;
@@ -3229,10 +3229,10 @@ static void rewritelog(request_rec *r, int level, const char *text, ...)
(unsigned long)(r->server), (unsigned long)r,
type, redir, level, str2);
- apr_lock_acquire(rewrite_log_lock);
+ apr_global_mutex_lock(rewrite_log_lock);
nbytes = strlen(str3);
apr_file_write(conf->rewritelogfp, str3, &nbytes);
- apr_lock_release(rewrite_log_lock);
+ apr_global_mutex_unlock(rewrite_log_lock);
va_end(ap);
return;
diff --git a/modules/mappers/mod_rewrite.h b/modules/mappers/mod_rewrite.h
index 2a42032cbf..e31bd80d68 100644
--- a/modules/mappers/mod_rewrite.h
+++ b/modules/mappers/mod_rewrite.h
@@ -113,7 +113,6 @@
#endif
#if APR_HAS_THREADS
-#include "apr_lock.h"
#include "apr_thread_mutex.h"
#endif
#include "ap_config.h"