From 8fb0b6f980a6b2a0475bbef38d8eeff8e49d7784 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Fri, 5 Dec 2014 07:57:57 +0000 Subject: [PATCH] mpm_{prefork,worker}: follow up to r1635521. Don't crash when there is no accept mutex (one listener => apr_proc_mutex_name(NULL)). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643179 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/prefork/prefork.c | 4 +++- server/mpm/worker/worker.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 260e37666c..56b2772e52 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -1037,7 +1037,9 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_log_common(s); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00165) "Accept mutex: %s (default: %s)", - apr_proc_mutex_name(all_buckets[0].mutex), + (all_buckets[0].mutex) + ? apr_proc_mutex_name(all_buckets[0].mutex) + : "none", apr_proc_mutex_defname()); mpm_state = AP_MPMQ_RUNNING; diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 190bc5ba93..d5fcc77cb5 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -1869,7 +1869,9 @@ static int worker_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_log_common(s); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00294) "Accept mutex: %s (default: %s)", - apr_proc_mutex_name(all_buckets[0].mutex), + (all_buckets[0].mutex) + ? apr_proc_mutex_name(all_buckets[0].mutex) + : "none", apr_proc_mutex_defname()); mpm_state = AP_MPMQ_RUNNING; -- 2.50.1