httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_rewrite.c
Date Sat, 16 Feb 2002 21:57:17 GMT
brianp      02/02/16 13:57:17

  Modified:    modules/mappers mod_rewrite.c
  Log:
  Converted the rewrite mapper lock to the new lock API
  
  Revision  Changes    Path
  1.96      +9 -7      httpd-2.0/modules/mappers/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- mod_rewrite.c	29 Jan 2002 12:30:52 -0000	1.95
  +++ mod_rewrite.c	16 Feb 2002 21:57:17 -0000	1.96
  @@ -93,6 +93,7 @@
   #include "apr_user.h"
   #include "apr_lib.h"
   #include "apr_signal.h"
  +#include "apr_proc_mutex.h"
   
   #define APR_WANT_STRFUNC
   #define APR_WANT_IOVEC
  @@ -186,7 +187,7 @@
   static int proxy_available;
   
   static const char *lockname;
  -static apr_lock_t *rewrite_mapr_lock_acquire = NULL;
  +static apr_proc_mutex_t *rewrite_mapr_lock_acquire = NULL;
   static apr_lock_t *rewrite_log_lock = NULL;
   
   /*
  @@ -977,7 +978,8 @@
   
       if (lockname != NULL && *(lockname) != '\0')
       {
  -        rv = apr_lock_child_init (&rewrite_mapr_lock_acquire, lockname, p);
  +        rv = apr_proc_mutex_child_init(&rewrite_mapr_lock_acquire,
  +                                       lockname, p);
           if (rv != APR_SUCCESS) {
               ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
                            "mod_rewrite: could not init rewrite_mapr_lock_acquire "
  @@ -2929,7 +2931,7 @@
       /* take the lock */
   
       if (rewrite_mapr_lock_acquire) {
  -        apr_lock_acquire(rewrite_mapr_lock_acquire);
  +        apr_proc_mutex_lock(rewrite_mapr_lock_acquire);
       }
   
       /* write out the request key */
  @@ -2964,7 +2966,7 @@
   
       /* give the lock back */
       if (rewrite_mapr_lock_acquire) {
  -        apr_lock_release(rewrite_mapr_lock_acquire);
  +        apr_proc_mutex_unlock(rewrite_mapr_lock_acquire);
       }
   
       if (strcasecmp(buf, "NULL") == 0) {
  @@ -3266,8 +3268,8 @@
       lockname = ap_server_root_relative(p, lockname);
   
       /* create the lockfile */
  -    rc = apr_lock_create(&rewrite_mapr_lock_acquire, APR_MUTEX, APR_LOCKALL, 
  -                         APR_LOCK_DEFAULT, lockname, p);
  +    rc = apr_proc_mutex_create(&rewrite_mapr_lock_acquire, lockname,
  +                               APR_LOCK_DEFAULT, p);
       if (rc != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_ERR, rc, s,
                        "mod_rewrite: Parent could not create RewriteLock "
  @@ -3286,7 +3288,7 @@
       }
   
       /* destroy the rewritelock */
  -    apr_lock_destroy (rewrite_mapr_lock_acquire);
  +    apr_proc_mutex_destroy (rewrite_mapr_lock_acquire);
       rewrite_mapr_lock_acquire = NULL;
       lockname = NULL;
       return(0);
  
  
  

Mime
View raw message