httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/worker worker.c
Date Tue, 14 Aug 2001 12:30:50 GMT
trawick     01/08/14 05:30:50

  Modified:    include  mpm_common.h
               server   mpm_common.c
               server/mpm/perchild perchild.c
               server/mpm/prefork prefork.c
               server/mpm/threaded threaded.c
               server/mpm/worker worker.c
  Log:
  namespace-protect accept_lock_mech
  
  fix a bug in the worker MPM which effectively disabled the AcceptMutex
  directive
  
  Revision  Changes    Path
  1.28      +1 -1      httpd-2.0/include/mpm_common.h
  
  Index: mpm_common.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/mpm_common.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mpm_common.h	2001/08/13 18:24:53	1.27
  +++ mpm_common.h	2001/08/14 12:30:49	1.28
  @@ -252,7 +252,7 @@
    * The system mutex implementation to use for the accept mutex.
    */
   #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
  -extern apr_lockmech_e_np accept_lock_mech;
  +extern apr_lockmech_e_np ap_accept_lock_mech;
   const char *ap_mpm_set_accept_lock_mech(cmd_parms *cmd, void *dummy,
                                           const char *arg);
   #endif
  
  
  
  1.64      +6 -6      httpd-2.0/server/mpm_common.c
  
  Index: mpm_common.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm_common.c,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- mpm_common.c	2001/08/13 18:24:53	1.63
  +++ mpm_common.c	2001/08/14 12:30:49	1.64
  @@ -570,7 +570,7 @@
   #endif
   
   #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
  -apr_lockmech_e_np accept_lock_mech = APR_LOCK_DEFAULT;
  +apr_lockmech_e_np ap_accept_lock_mech = APR_LOCK_DEFAULT;
   AP_DECLARE(const char *) ap_mpm_set_accept_lock_mech(cmd_parms *cmd,
   						     void *dummy,
   						     const char *arg)
  @@ -581,26 +581,26 @@
       }
   
       if (!strcasecmp(arg, "default")) {
  -        accept_lock_mech = APR_LOCK_DEFAULT;
  +        ap_accept_lock_mech = APR_LOCK_DEFAULT;
       }
   #if APR_HAS_FLOCK_SERIALIZE
       else if (!strcasecmp(arg, "flock")) {
  -        accept_lock_mech = APR_LOCK_FLOCK;
  +        ap_accept_lock_mech = APR_LOCK_FLOCK;
       }
   #endif
   #if APR_HAS_FCNTL_SERIALIZE
       else if (!strcasecmp(arg, "fcntl")) {
  -        accept_lock_mech = APR_LOCK_FCNTL;
  +        ap_accept_lock_mech = APR_LOCK_FCNTL;
       }
   #endif
   #if APR_HAS_SYSVSEM_SERIALIZE
       else if (!strcasecmp(arg, "sysvsem")) {
  -        accept_lock_mech = APR_LOCK_SYSVSEM;
  +        ap_accept_lock_mech = APR_LOCK_SYSVSEM;
       }
   #endif
   #if APR_HAS_PROC_PTHREAD_SERIALIZE
       else if (!strcasecmp(arg, "proc_pthread")) {
  -        accept_lock_mech = APR_LOCK_PROC_PTHREAD;
  +        ap_accept_lock_mech = APR_LOCK_PROC_PTHREAD;
       }
   #endif
       else {
  
  
  
  1.74      +1 -1      httpd-2.0/server/mpm/perchild/perchild.c
  
  Index: perchild.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/perchild/perchild.c,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- perchild.c	2001/08/13 04:57:35	1.73
  +++ perchild.c	2001/08/14 12:30:50	1.74
  @@ -1197,7 +1197,7 @@
                                ap_server_root_relative(_pconf, ap_lock_fname),
                                my_pid);
       rv = SAFE_ACCEPT(apr_lock_create_np(&process_accept_mutex, APR_MUTEX,
  -                                        APR_CROSS_PROCESS, accept_lock_mech,
  +                                        APR_CROSS_PROCESS, ap_accept_lock_mech,
                                           ap_lock_fname, _pconf));
       if (rv != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
  
  
  
  1.195     +1 -1      httpd-2.0/server/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
  retrieving revision 1.194
  retrieving revision 1.195
  diff -u -r1.194 -r1.195
  --- prefork.c	2001/08/13 04:57:35	1.194
  +++ prefork.c	2001/08/14 12:30:50	1.195
  @@ -271,7 +271,7 @@
   
       expand_lock_fname(p);
       rv = apr_lock_create_np(&accept_lock, APR_MUTEX, APR_CROSS_PROCESS, 
  -                            accept_lock_mech, ap_lock_fname, p);
  +                            ap_accept_lock_mech, ap_lock_fname, p);
       if (rv) {
   	ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't create accept mutex");
           exit(APEXIT_INIT);
  
  
  
  1.60      +1 -1      httpd-2.0/server/mpm/threaded/threaded.c
  
  Index: threaded.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/threaded.c,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- threaded.c	2001/08/13 14:58:24	1.59
  +++ threaded.c	2001/08/14 12:30:50	1.60
  @@ -1222,7 +1222,7 @@
                                    ap_server_root_relative(_pconf, ap_lock_fname),
                                    ap_my_pid);
       rv = apr_lock_create_np(&accept_mutex, APR_MUTEX, APR_LOCKALL,
  -                            accept_lock_mech, ap_lock_fname, _pconf);
  +                            ap_accept_lock_mech, ap_lock_fname, _pconf);
       if (rv != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
                        "Couldn't create accept lock");
  
  
  
  1.13      +1 -2      httpd-2.0/server/mpm/worker/worker.c
  
  Index: worker.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/worker/worker.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- worker.c	2001/08/13 04:57:35	1.12
  +++ worker.c	2001/08/14 12:30:50	1.13
  @@ -190,7 +190,6 @@
   
   /* Locks for accept serialization */
   static apr_lock_t *accept_mutex;
  -static apr_lockmech_e_np accept_lock_mech = APR_LOCK_DEFAULT;
   static const char *lock_fname;
   
   #ifdef NO_SERIALIZED_ACCEPT
  @@ -1266,7 +1265,7 @@
                                ap_server_root_relative(_pconf, lock_fname),
                                ap_my_pid);
       rv = apr_lock_create_np(&accept_mutex, APR_MUTEX, APR_LOCKALL,
  -                            accept_lock_mech, lock_fname, _pconf);
  +                            ap_accept_lock_mech, lock_fname, _pconf);
       if (rv != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
                        "Couldn't create accept lock");
  
  
  

Mime
View raw message