From 26bcd2591ec7aae0d03361ede55c2862799128b9 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Thu, 4 Jan 2018 16:05:02 +0000 Subject: [PATCH] =?utf8?q?incorporate=20review=20comments=20from=20R=C3=BC?= =?utf8?q?diger?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1820113 13f79535-47bb-0310-9956-ffa450edef68 --- server/listen.c | 8 ++++++-- server/mpm/prefork/prefork.c | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/server/listen.c b/server/listen.c index 56308e21cc..b995abe857 100644 --- a/server/listen.c +++ b/server/listen.c @@ -1144,8 +1144,12 @@ AP_DECLARE_NONSTD(const char *) ap_set_accept_errors_nonfatal(cmd_parms *cmd, void *dummy, int flag) { - ap_accept_errors_nonfatal = flag; - return NULL; + const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); + if (err != NULL) { + return err; + } + ap_accept_errors_nonfatal = flag; + return NULL; } AP_DECLARE_NONSTD(const char *) ap_set_receive_buffer_size(cmd_parms *cmd, diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index e20c516c7e..cd3de1d0e8 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -600,8 +600,8 @@ static void child_main(int child_num_arg, int child_bucket) /* resource shortage or should-not-occur occurred */ clean_child_exit(APEXIT_CHILDSICK); } - else if (ap_accept_error_is_nonfatal(rc)) { - ap_log_error(APLOG_MARK, APLOG_DEBUG, rc, ap_server_conf, + if (ap_accept_error_is_nonfatal(status)) { + ap_log_error(APLOG_MARK, APLOG_DEBUG, status, ap_server_conf, "accept() on client socket failed"); } -- 2.40.0