mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Right now SSLMutex is bogus. It just uses APR_LOCK_DEFAULT no
matter what. We now allow for the full range of APR mutex locking mechanims to be used, while maintaining backwards compatibility. PR: 8122 Obtained from: Submitted by: Reviewed by: William Rowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98771 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -75,9 +75,13 @@ int ssl_mutex_init(server_rec *s, apr_pool_t *p)
|
||||
|
||||
if ((rv = apr_global_mutex_create(&mc->pMutex, mc->szMutexFile,
|
||||
APR_LOCK_DEFAULT, p)) != APR_SUCCESS) {
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
|
||||
"Cannot create SSLMutex file `%s'",
|
||||
mc->szMutexFile);
|
||||
if (mc->szMutexFile)
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
|
||||
"Cannot create SSLMutex with file `%s'",
|
||||
mc->szMutexFile);
|
||||
else
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
|
||||
"Cannot create SSLMutex");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -96,13 +100,22 @@ int ssl_mutex_init(server_rec *s, apr_pool_t *p)
|
||||
int ssl_mutex_reinit(server_rec *s, apr_pool_t *p)
|
||||
{
|
||||
SSLModConfigRec *mc = myModConfig(s);
|
||||
apr_status_t rv;
|
||||
|
||||
if (mc->nMutexMode == SSL_MUTEXMODE_NONE)
|
||||
return TRUE;
|
||||
|
||||
if (apr_global_mutex_child_init(&mc->pMutex,
|
||||
mc->szMutexFile, p) != APR_SUCCESS)
|
||||
if ((rv = apr_global_mutex_child_init(&mc->pMutex,
|
||||
mc->szMutexFile, p)) != APR_SUCCESS) {
|
||||
if (mc->szMutexFile)
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
|
||||
"Cannot reinit SSLMutex with file `%s'",
|
||||
mc->szMutexFile);
|
||||
else
|
||||
ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s,
|
||||
"Cannot reinit SSLMutex");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user