From: Eric Covener Date: Thu, 4 Jan 2018 16:05:02 +0000 (+0000) Subject: incorporate review comments from RĂ¼diger X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26bcd2591ec7aae0d03361ede55c2862799128b9;p=apache incorporate review comments from RĂ¼diger git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1820113 13f79535-47bb-0310-9956-ffa450edef68 --- 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"); }