From 4d2bc3d3dab2f780b5bd8f342df2c2e03d05bf7a Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Mon, 12 Feb 2001 18:48:00 +0000 Subject: [PATCH] Begin to move the code that updates the child status out of the MPMs and into the main-line code. This ensures that all MPMs can easily forget about updating their status. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88117 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ server/connection.c | 3 +++ server/mpm/dexter/dexter.c | 3 --- server/mpm/mpmt_pthread/mpmt_pthread.c | 3 --- server/mpm/prefork/prefork.c | 3 --- server/mpm/spmt_os2/spmt_os2.c | 3 --- server/mpm/winnt/mpm_winnt.c | 3 --- 7 files changed, 7 insertions(+), 15 deletions(-) diff --git a/CHANGES b/CHANGES index 6e6b9c2c64..bd90971b99 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0b1 + *) Begin to move the calls to update_child_status into common code, so + that each individual MPM does not need to update the scoreboard itself. + [Ryan Bloom] + *) Allow mod_tls to compile under Unix boxes where openssl has been installed to the system include files. [Gomez Henri ] diff --git a/server/connection.c b/server/connection.c index 15c7458475..375be1dfdd 100644 --- a/server/connection.c +++ b/server/connection.c @@ -269,6 +269,9 @@ conn_rec *ap_new_connection(apr_pool_t *p, server_rec *server, conn_rec *conn = (conn_rec *) apr_pcalloc(p, sizeof(conn_rec)); apr_status_t rv; + (void) ap_update_child_status(AP_CHILD_THREAD_FROM_ID(id), + SERVER_BUSY_READ, (request_rec *) NULL); + /* Got a connection structure, so initialize what fields we can * (the rest are zeroed out by pcalloc). */ diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index 3ac66849ba..68a878a803 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -419,9 +419,6 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, long conn_id) ap_sock_disable_nagle(sock); - (void) ap_update_child_status(AP_CHILD_THREAD_FROM_ID(conn_id), - SERVER_BUSY_READ, (request_rec *) NULL); - current_conn = ap_new_connection(p, ap_server_conf, sock, conn_id); if (current_conn) { ap_process_connection(current_conn); diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index a9420fff1b..e017f28162 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -414,9 +414,6 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, int my_child_num, ap_sock_disable_nagle(sock); - (void) ap_update_child_status(my_child_num, my_thread_num, - SERVER_BUSY_READ, (request_rec *) NULL); - current_conn = ap_new_connection(p, ap_server_conf, sock, conn_id); if (current_conn) { ap_process_connection(current_conn); diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 2694dc3300..9095fc5f8d 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -790,9 +790,6 @@ static void child_main(int child_num_arg) ap_sock_disable_nagle(csd); - (void) ap_update_child_status(AP_CHILD_THREAD_FROM_ID(my_child_num), SERVER_BUSY_READ, - (request_rec *) NULL); - current_conn = ap_new_connection(ptrans, ap_server_conf, csd, my_child_num); if (current_conn) { diff --git a/server/mpm/spmt_os2/spmt_os2.c b/server/mpm/spmt_os2/spmt_os2.c index 0119e09446..156891f00f 100644 --- a/server/mpm/spmt_os2/spmt_os2.c +++ b/server/mpm/spmt_os2/spmt_os2.c @@ -691,9 +691,6 @@ static void thread_main(void *thread_num_arg) ap_sock_disable_nagle(csd); - (void) ap_update_child_status(0, THREAD_GLOBAL(thread_num), SERVER_BUSY_READ, - (request_rec *) NULL); - current_conn = ap_new_connection(ptrans, ap_server_conf, csd, THREAD_GLOBAL(thread_num)); diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 22fe03651b..952ee3e0cd 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -1162,9 +1162,6 @@ static void worker_main(int thread_num) sockinfo.type = SOCK_STREAM; apr_os_sock_make(&context->sock, &sockinfo, context->ptrans); - ap_update_child_status(0, thread_num, - SERVER_BUSY_READ, (request_rec *) NULL); - c = ap_new_connection(context->ptrans, server_conf, context->sock, thread_num); -- 2.40.0