]> granicus.if.org Git - apache/commitdiff
Set the scoreboard state to indicate logging prior to running
authorJeff Trawick <trawick@apache.org>
Wed, 22 Oct 2003 16:45:53 +0000 (16:45 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 22 Oct 2003 16:45:53 +0000 (16:45 +0000)
logging hooks so that server-status will show 'L' for hung loggers
instead of 'W'.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101517 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http/http_request.c
server/protocol.c

diff --git a/CHANGES b/CHANGES
index f032e111316f976eff1e264f679399430a2cb4fd..1c46f6c18d04193b626569ce65a648b53b11fe54 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) Set the scoreboard state to indicate logging prior to running 
+     logging hooks so that server-status will show 'L' for hung loggers
+     instead of 'W'.  [Jeff Trawick]
+
   *) mod_include: fix segfault which occured if the filename was not
      set, for example, when processing some error conditions.
      PR 23836.  [Brian Akins <bakins@web.turner.com>, AndrĂ© Malo]
index ae01c260dea16df0bb98e4429c845f39e643534d..fe59ebc0797b9ea6d648aa62ab95a5287e8376b3 100644 (file)
@@ -84,6 +84,7 @@
 #include "http_main.h"
 #include "util_filter.h"
 #include "util_charset.h"
+#include "scoreboard.h"
 
 #include "mod_core.h"
 
@@ -309,6 +310,7 @@ void ap_process_request(request_rec *r)
      * it's the application that's stalled.
      */
     check_pipeline_flush(r);
+    ap_update_child_status(r->connection->sbh, SERVER_BUSY_LOG, r);
     ap_run_log_transaction(r);
 }
 
index 1222e84466c0b6429b8b14d174fd18b991d68501..8ca2cad39e293be2ea7d5447c540bc49cd8c78ad 100644 (file)
@@ -90,6 +90,7 @@
 #include "mod_core.h"
 #include "util_charset.h"
 #include "util_ebcdic.h"
+#include "scoreboard.h"
 
 #if APR_HAVE_STDARG_H
 #include <stdarg.h>
@@ -901,6 +902,7 @@ request_rec *ap_read_request(conn_rec *conn)
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                           "request failed: URI too long");
             ap_send_error_response(r, 0);
+            ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
             ap_run_log_transaction(r);
             apr_brigade_destroy(tmp_bb);
             return r;
@@ -916,6 +918,7 @@ request_rec *ap_read_request(conn_rec *conn)
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                           "request failed: error reading the headers");
             ap_send_error_response(r, 0);
+            ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
             ap_run_log_transaction(r);
             apr_brigade_destroy(tmp_bb);
             return r;
@@ -934,6 +937,7 @@ request_rec *ap_read_request(conn_rec *conn)
             r->header_only = 0;
             r->status = HTTP_BAD_REQUEST;
             ap_send_error_response(r, 0);
+            ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
             ap_run_log_transaction(r);
             apr_brigade_destroy(tmp_bb);
             return r;
@@ -970,12 +974,14 @@ request_rec *ap_read_request(conn_rec *conn)
 
     if (r->status != HTTP_OK) {
         ap_send_error_response(r, 0);
+        ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
         ap_run_log_transaction(r);
         return r;
     }
 
     if ((access_status = ap_run_post_read_request(r))) {
         ap_die(access_status, r);
+        ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
         ap_run_log_transaction(r);
         return NULL;
     }
@@ -997,6 +1003,7 @@ request_rec *ap_read_request(conn_rec *conn)
                           "client sent an unrecognized expectation value of "
                           "Expect: %s", expect);
             ap_send_error_response(r, 0);
+            ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
             ap_run_log_transaction(r);
             return r;
         }