]> granicus.if.org Git - apache/commitdiff
incorporate review comments from RĂ¼diger
authorEric Covener <covener@apache.org>
Thu, 4 Jan 2018 16:05:02 +0000 (16:05 +0000)
committerEric Covener <covener@apache.org>
Thu, 4 Jan 2018 16:05:02 +0000 (16:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1820113 13f79535-47bb-0310-9956-ffa450edef68

server/listen.c
server/mpm/prefork/prefork.c

index 56308e21cc06839fb845eb22fa65145269df6453..b995abe857d74a315a0be452b00a4ffaf336a173 100644 (file)
@@ -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,
index e20c516c7ed95839cbfa3d316bea8483efede3f6..cd3de1d0e88262c95b342d00d94748855a805d59 100644 (file)
@@ -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");
         }