HI,

This week I already psted a patch for this, but that was broken.
My second attempt (attached).


Harrie
-- 
address: Covalent Technologies, 645 Howard St, San Francisco, CA - 94105
phone: +1-415-536-5221                               fax:+1-415-536-5210
personal website: http://www.lisanza.net/
--- server/scoreboard.c-orig    Tue Jun 26 15:32:10 2001
+++ server/scoreboard.c Wed Jun 27 15:04:29 2001
@@ -348,3 +348,29 @@
     put_scoreboard_info(child_num, thread_num, ws);
 }
 
+worker_score *ap_get_servers_scoreboard(int x, int y)
+{
+int hard_server_limit;
+int hard_thread_limit;
+
+    ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &hard_server_limit);
+    ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &hard_thread_limit);
+
+    if (((x < 0) || (hard_server_limit < x)) ||
+        ((y < 0) || (hard_thread_limit < y))) {
+        return(NULL); /* Out of range */
+    }
+    return(&ap_scoreboard_image->servers[x][y]);
+}
+
+process_score *ap_get_parent_scoreboard(int x)
+{
+int hard_server_limit;
+
+    ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &hard_server_limit);
+    
+    if ((x < 0) || (hard_server_limit < x)) {
+        return(NULL); /* Out of range */
+    }
+    return(&ap_scoreboard_image->parent[x]);
+}
--- include/scoreboard.h-orig   Wed Jun 27 14:42:55 2001
+++ include/scoreboard.h        Wed Jun 27 14:46:39 2001
@@ -216,6 +219,8 @@
 AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid);
 int ap_update_child_status(int child_num, int thread_num, int status, request_rec *r);
 void ap_time_process_request(int child_num, int thread_num, int status);
+worker_score *ap_get_servers_scoreboard(int x, int y);
+process_score *ap_get_parent_scoreboard(int x);
 
 
 AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image;

Reply via email to