httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r723677 - /httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
Date Fri, 05 Dec 2008 09:16:21 GMT
Author: pquerna
Date: Fri Dec  5 01:16:20 2008
New Revision: 723677

URL: http://svn.apache.org/viewvc?rev=723677&view=rev
Log:
Print the correct enum value for the lock mech.
Suggested by: Ruediger Pluem

Modified:
    httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c

Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c?rev=723677&r1=723676&r2=723677&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c (original)
+++ httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Fri Dec  5 01:16:20 2008
@@ -443,6 +443,7 @@
 static int hm_post_config(apr_pool_t *p, apr_pool_t *plog,
                           apr_pool_t *ptemp, server_rec *s)
 {
+    apr_lockmech_e mech;
     apr_status_t rv;
     hm_ctx_t *ctx = ap_get_module_config(s->module_config,
                                          &heartmonitor_module);
@@ -452,25 +453,26 @@
         return OK;
     }
 
-    rv = apr_proc_mutex_create(&ctx->mutex,
-                                            ctx->mutex_path,
 #if APR_HAS_FCNTL_SERIALIZE
-
-                                            APR_LOCK_FCNTL,
+    mech = APR_LOCK_FCNTL;
 #else
 #if APR_HAS_FLOCK_SERIALIZE
-                                            APR_LOCK_FLOCK,
+    mech = APR_LOCK_FLOCK;
 #else
 #error port me to a non crap platform.
 #endif
 #endif
+    
+    rv = apr_proc_mutex_create(&ctx->mutex,
+                                            ctx->mutex_path,
+                                            mech,
                                             p);
 
     if (rv) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
                      "Heartmonitor: Failed to create listener "
-                     "mutex at %s (type=%s)", ctx->mutex_path,
-                     apr_proc_mutex_defname());
+                     "mutex at %s (type=%d)", ctx->mutex_path,
+                     mech);
         return !OK;
     }
 



Mime
View raw message