httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl mod_ssl.h ssl_engine_init.c ssl_engine_mutex.c
Date Fri, 11 Jan 2002 06:05:18 GMT
wrowe       02/01/10 22:05:18

  Modified:    modules/ssl mod_ssl.h ssl_engine_init.c ssl_engine_mutex.c
  Log:
    The mutex must be pool-managed, not ssl managed.  We are encountering
    segfaults on Win32 when the cleanup of the mutex occurs after the pool
    was destroyed.
  
  Revision  Changes    Path
  1.53      +0 -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.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- mod_ssl.h	10 Jan 2002 04:55:19 -0000	1.52
  +++ mod_ssl.h	11 Jan 2002 06:05:18 -0000	1.53
  @@ -733,7 +733,6 @@
   int          ssl_mutex_reinit(server_rec *, apr_pool_t *);
   int          ssl_mutex_on(server_rec *);
   int          ssl_mutex_off(server_rec *);
  -int          ssl_mutex_kill(server_rec *);
   
   /*  Logfile Support  */
   void         ssl_log_open(server_rec *, server_rec *, apr_pool_t *);
  
  
  
  1.24      +3 -5      httpd-2.0/modules/ssl/ssl_engine_init.c
  
  Index: ssl_engine_init.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ssl_engine_init.c	10 Jan 2002 04:55:19 -0000	1.23
  +++ ssl_engine_init.c	11 Jan 2002 06:05:18 -0000	1.24
  @@ -970,9 +970,9 @@
       /* XXX: there should be an ap_srand() function */
       srand((unsigned int)time(NULL));
   
  -     /* open the mutex lockfile */
  -     ssl_mutex_reinit(s, p);
  -     return;
  +    /* open the mutex lockfile */
  +    ssl_mutex_reinit(s, p);
  +    return;
   }
   
   apr_status_t ssl_init_ChildKill(void *data)
  @@ -991,8 +991,6 @@
        * Drop the session cache and mutex
        */
       ssl_scache_kill(s);
  -
  -    ssl_mutex_kill(s);
   
       /* 
        * Destroy the temporary keys and params
  
  
  
  1.9       +2 -15     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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ssl_engine_mutex.c	9 Jan 2002 22:21:34 -0000	1.8
  +++ ssl_engine_mutex.c	11 Jan 2002 06:05:18 -0000	1.9
  @@ -68,6 +68,7 @@
   
       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)
           return FALSE;
  @@ -80,6 +81,7 @@
   
       if (mc->nMutexMode == SSL_MUTEXMODE_NONE)
           return TRUE;
  +
       if (apr_lock_child_init(&mc->pMutex, mc->szMutexFile, p) != APR_SUCCESS)
           return FALSE;
       return TRUE;
  @@ -108,21 +110,6 @@
           ssl_log(s, SSL_LOG_WARN, "Failed to release global mutex lock");
           return FALSE;
       }
  -    return TRUE;
  -}
  -
  -int ssl_mutex_kill(server_rec *s)
  -{
  -    SSLModConfigRec *mc = myModConfig(s);
  -
  -    if (mc->nMutexMode == SSL_MUTEXMODE_NONE)
  -        return TRUE;
  -    /* XXX: currently mutex is not created until 2nd pass at startup */
  -    if (!mc->pMutex)
  -        return TRUE;
  -    if (apr_lock_destroy(mc->pMutex) != APR_SUCCESS)
  -        return FALSE;
  -    mc->pMutex = NULL;
       return TRUE;
   }
   
  
  
  

Mime
View raw message