diff options
author | Aaron Bannert <aaron@apache.org> | 2002-04-05 22:01:20 +0200 |
---|---|---|
committer | Aaron Bannert <aaron@apache.org> | 2002-04-05 22:01:20 +0200 |
commit | 1e8b1a0dbcf6a3cb17eb0a0cd7e5d83254c5f162 (patch) | |
tree | 623d34b99c6d3770960dbe90c6273fd1d6f8e2bc | |
parent | With VPATH builds, the httpd.conf-std file is found in the build directory, (diff) | |
download | apache2-1e8b1a0dbcf6a3cb17eb0a0cd7e5d83254c5f162.tar.xz apache2-1e8b1a0dbcf6a3cb17eb0a0cd7e5d83254c5f162.zip |
Update mod_rewrite to use the new APR global mutex type.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94465 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | modules/mappers/mod_rewrite.c | 10 | ||||
-rw-r--r-- | modules/mappers/mod_rewrite.h | 1 |
3 files changed, 8 insertions, 6 deletions
@@ -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" |