]> granicus.if.org Git - apache/commitdiff
Must fix - Win32 can't deal with this code, and we can no longer fix
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 31 Mar 2003 07:24:34 +0000 (07:24 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 31 Mar 2003 07:24:34 +0000 (07:24 +0000)
    sysv mutexes with an APR_USE_ test... we have to look at the choice!

  Reviewed by: Brian Pane, Justin Erenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99146 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_mutex.c

index 2e3efca15d837d2f0ad823a517a8f7e84b34912d..ae4e3c464300f0c0bd542d63e7123ebea639f400 100644 (file)
@@ -88,16 +88,25 @@ int ssl_mutex_init(server_rec *s, apr_pool_t *p)
                          "Cannot create SSLMutex");
         return FALSE;
     }
+#if APR_HAS_FLOCK_SERIALIZE
     if (mc->szMutexFile && mc->ChownMutexFile == TRUE)
         chown(mc->szMutexFile, unixd_config.user_id, -1);
+#endif
 
+#if APR_HAS_SYSVSEM_SERIALIZE
 #if APR_USE_SYSVSEM_SERIALIZE
-    rv = unixd_set_global_mutex_perms(mc->pMutex);
-    if (rv != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
-                     "Could not set permissions on ssl_mutex; check User "
-                     "and Group directives");
-        return FALSE;
+    if (mc->nMutexMech == APR_LOCK_DEFAULT || 
+        mc->nMutexMech == APR_LOCK_SYSVSEM) {
+#else
+    if (mc->nMutexMech == APR_LOCK_SYSVSEM) {
+#endif
+        rv = unixd_set_global_mutex_perms(mc->pMutex);
+        if (rv != APR_SUCCESS) {
+            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
+                         "Could not set permissions on ssl_mutex; check User "
+                         "and Group directives");
+            return FALSE;
+        }
     }
 #endif
     return TRUE;