httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aa...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_mutex.c mod_ssl.h
Date Tue, 09 Apr 2002 15:53:09 GMT
aaron       02/04/09 08:53:09

  Modified:    modules/ssl ssl_engine_mutex.c mod_ssl.h
  Log:
  Convert mod_ssl to the new apr_global_mutex.h API and remove all
  uses of apr_lock.h [deprecated]. Tested that I could serve simple
  SSL (v3) pages.
  
  Revision  Changes    Path
  1.13      +6 -5      httpd-2.0/modules/ssl/ssl_engine_mutex.c
  
  Index: ssl_engine_mutex.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_mutex.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ssl_engine_mutex.c	13 Mar 2002 20:47:55 -0000	1.12
  +++ ssl_engine_mutex.c	9 Apr 2002 15:53:09 -0000	1.13
  @@ -69,8 +69,8 @@
       if (mc->nMutexMode == SSL_MUTEXMODE_NONE) 
           return TRUE;
   
  -    if (apr_lock_create(&mc->pMutex, APR_MUTEX, APR_LOCKALL, APR_LOCK_DEFAULT,
  -                        mc->szMutexFile, p) != APR_SUCCESS) {
  +    if (apr_global_mutex_create(&mc->pMutex, mc->szMutexFile,
  +                                APR_LOCK_DEFAULT, p) != APR_SUCCESS) {
           ssl_log(s, SSL_LOG_ERROR,
                      "Cannot create SSLMutex file `%s'",
                       mc->szMutexFile);
  @@ -86,7 +86,8 @@
       if (mc->nMutexMode == SSL_MUTEXMODE_NONE)
           return TRUE;
   
  -    if (apr_lock_child_init(&mc->pMutex, mc->szMutexFile, p) != APR_SUCCESS)
  +    if (apr_global_mutex_child_init(&mc->pMutex,
  +                                    mc->szMutexFile, p) != APR_SUCCESS)
           return FALSE;
       return TRUE;
   }
  @@ -97,7 +98,7 @@
   
       if (mc->nMutexMode == SSL_MUTEXMODE_NONE)
           return TRUE;
  -    if (apr_lock_acquire(mc->pMutex) != APR_SUCCESS) {
  +    if (apr_global_mutex_lock(mc->pMutex) != APR_SUCCESS) {
           ssl_log(s, SSL_LOG_WARN, "Failed to acquire global mutex lock");
           return FALSE;
       }
  @@ -110,7 +111,7 @@
   
       if (mc->nMutexMode == SSL_MUTEXMODE_NONE)
           return TRUE;
  -    if (apr_lock_release(mc->pMutex) != APR_SUCCESS) {
  +    if (apr_global_mutex_unlock(mc->pMutex) != APR_SUCCESS) {
           ssl_log(s, SSL_LOG_WARN, "Failed to release global mutex lock");
           return FALSE;
       }
  
  
  
  1.115     +2 -1      httpd-2.0/modules/ssl/mod_ssl.h
  
  Index: mod_ssl.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.h,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- mod_ssl.h	7 Apr 2002 21:58:25 -0000	1.114
  +++ mod_ssl.h	9 Apr 2002 15:53:09 -0000	1.115
  @@ -102,6 +102,7 @@
   #include "apr_dbm.h"
   #include "apr_rmm.h"
   #include "apr_shm.h"
  +#include "apr_global_mutex.h"
   #include "apr_optional.h"
   
   #define MOD_SSL_VERSION AP_SERVER_BASEREVISION
  @@ -449,7 +450,7 @@
       apr_table_t    *tSessionCacheDataTable;
       ssl_mutexmode_t nMutexMode;
       const char     *szMutexFile;
  -    apr_lock_t     *pMutex;
  +    apr_global_mutex_t   *pMutex;
       apr_array_header_t   *aRandSeed;
       apr_hash_t     *tVHostKeys;
       void           *pTmpKeys[SSL_TMP_KEY_MAX];
  
  
  

Mime
View raw message