]> granicus.if.org Git - apache/commitdiff
Update mod_rewrite to use the new APR global mutex type.
authorAaron Bannert <aaron@apache.org>
Fri, 5 Apr 2002 20:01:20 +0000 (20:01 +0000)
committerAaron Bannert <aaron@apache.org>
Fri, 5 Apr 2002 20:01:20 +0000 (20:01 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94465 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/mappers/mod_rewrite.c
modules/mappers/mod_rewrite.h

diff --git a/CHANGES b/CHANGES
index 50d5a46c89f5089207311178f8d1735dab5ad20e..1ce239305f8028543ab9636ccfbd23bb71f55c70 100644 (file)
--- 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]
index 0e877c1a1bda98bbd4d73ed7580292e15111c7cb..83b7a8f258dd60e6d312c504ffc7b16cd7e1f3c2 100644 (file)
@@ -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;
index 2a42032cbf0f88a956a0ac41ff3e7e6162566160..e31bd80d68cf0748aeb5347006a4edfac7219b28 100644 (file)
 #endif
 
 #if APR_HAS_THREADS
-#include "apr_lock.h"
 #include "apr_thread_mutex.h"
 #endif
 #include "ap_config.h"