diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2006-03-22 13:19:20 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2006-03-22 13:19:20 +0000 |
commit | 97bdd4e9589756b118af63d9bf10072b0ad71c95 (patch) | |
tree | 3b1575e812e07729403c76ec3d1b1dedaaf1fd1f /usr.sbin/httpd | |
parent | beeeb36b16ee162ea1b5040971593dd8614eb26b (diff) |
Remove four unused functions: ap_sync_scoreboard_image, reopen_scoreboard,
put_scoreboard_info, and update_scoreboard_global.
From Daniel Ouellet, plus one line he missed.
OK henning@ and otto@
Diffstat (limited to 'usr.sbin/httpd')
-rw-r--r-- | usr.sbin/httpd/src/include/ap_compat.h | 1 | ||||
-rw-r--r-- | usr.sbin/httpd/src/include/http_main.h | 3 | ||||
-rw-r--r-- | usr.sbin/httpd/src/include/scoreboard.h | 3 | ||||
-rw-r--r-- | usr.sbin/httpd/src/main/http_main.c | 37 | ||||
-rw-r--r-- | usr.sbin/httpd/src/modules/standard/mod_status.c | 1 | ||||
-rw-r--r-- | usr.sbin/httpd/src/support/httpd.exp | 1 |
6 files changed, 3 insertions, 43 deletions
diff --git a/usr.sbin/httpd/src/include/ap_compat.h b/usr.sbin/httpd/src/include/ap_compat.h index 52d618bf2b1..dec73644768 100644 --- a/usr.sbin/httpd/src/include/ap_compat.h +++ b/usr.sbin/httpd/src/include/ap_compat.h @@ -389,7 +389,6 @@ extern "C" { #define sub_req_lookup_file ap_sub_req_lookup_file #define sub_req_lookup_uri ap_sub_req_lookup_uri #define suexec_enabled ap_suexec_enabled -#define sync_scoreboard_image ap_sync_scoreboard_image #define table_add ap_table_add #define table_addn ap_table_addn #define table_do ap_table_do diff --git a/usr.sbin/httpd/src/include/http_main.h b/usr.sbin/httpd/src/include/http_main.h index 11292755170..6f3c02aa550 100644 --- a/usr.sbin/httpd/src/include/http_main.h +++ b/usr.sbin/httpd/src/include/http_main.h @@ -1,4 +1,4 @@ -/* $OpenBSD: http_main.h,v 1.12 2005/03/28 23:26:51 niallo Exp $ */ +/* $OpenBSD: http_main.h,v 1.13 2006/03/22 13:19:19 ray Exp $ */ /* ==================================================================== * The Apache Software License, Version 1.1 @@ -124,7 +124,6 @@ API_EXPORT(void) ap_kill_timeout(request_rec *); API_EXPORT(void) ap_reset_timeout(request_rec *); API_EXPORT(void) ap_child_terminate(request_rec *r); -API_EXPORT(void) ap_sync_scoreboard_image(void); API_EXPORT(int) ap_update_child_status(int child_num, int status, request_rec *r); void ap_time_process_request(int child_num, int status); diff --git a/usr.sbin/httpd/src/include/scoreboard.h b/usr.sbin/httpd/src/include/scoreboard.h index cf3696ac1fc..ad9535fbe86 100644 --- a/usr.sbin/httpd/src/include/scoreboard.h +++ b/usr.sbin/httpd/src/include/scoreboard.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scoreboard.h,v 1.11 2005/03/28 23:26:51 niallo Exp $ */ +/* $OpenBSD: scoreboard.h,v 1.12 2006/03/22 13:19:19 ray Exp $ */ /* ==================================================================== * The Apache Software License, Version 1.1 @@ -167,7 +167,6 @@ typedef struct { #define SCOREBOARD_SIZE sizeof(scoreboard) -API_EXPORT(void) ap_sync_scoreboard_image(void); API_EXPORT(int) ap_exists_scoreboard_image(void); API_VAR_EXPORT extern scoreboard *ap_scoreboard_image; diff --git a/usr.sbin/httpd/src/main/http_main.c b/usr.sbin/httpd/src/main/http_main.c index 987b56820a7..bf2b9e9661d 100644 --- a/usr.sbin/httpd/src/main/http_main.c +++ b/usr.sbin/httpd/src/main/http_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: http_main.c,v 1.42 2006/02/22 15:07:12 henning Exp $ */ +/* $OpenBSD: http_main.c,v 1.43 2006/03/22 13:19:19 ray Exp $ */ /* ==================================================================== * The Apache Software License, Version 1.1 @@ -1176,10 +1176,6 @@ static void setup_shared_mem(pool *p) ap_scoreboard_image->global.running_generation = 0; } -static void reopen_scoreboard(pool *p) -{ -} - /* Called by parent process */ static void reinit_scoreboard(pool *p) { @@ -1205,20 +1201,11 @@ static void reinit_scoreboard(pool *p) * anyway. */ -ap_inline void ap_sync_scoreboard_image(void) -{ -} - API_EXPORT(int) ap_exists_scoreboard_image(void) { return (ap_scoreboard_image ? 1 : 0); } -static ap_inline void put_scoreboard_info(int child_num, - short_score *new_score_rec) -{ -} - /* a clean exit from the parent with proper cleanup */ static void clean_parent_exit(int code) __attribute__((noreturn)); static void clean_parent_exit(int code) @@ -1240,7 +1227,6 @@ API_EXPORT(int) ap_update_child_status(int child_num, int status, request_rec *r ap_check_signals(); - ap_sync_scoreboard_image(); ss = &ap_scoreboard_image->servers[child_num]; old_status = ss->status; ss->status = status; @@ -1289,15 +1275,10 @@ API_EXPORT(int) ap_update_child_status(int child_num, int status, request_rec *r ss->vhostrec = NULL; ap_scoreboard_image->parent[child_num].generation = ap_my_generation; } - put_scoreboard_info(child_num, ss); return old_status; } -static void update_scoreboard_global(void) -{ -} - void ap_time_process_request(int child_num, int status) { short_score *ss; @@ -1305,7 +1286,6 @@ void ap_time_process_request(int child_num, int status) if (child_num < 0) return; - ap_sync_scoreboard_image(); ss = &ap_scoreboard_image->servers[child_num]; if (status == START_PREQUEST) { @@ -1321,8 +1301,6 @@ void ap_time_process_request(int child_num, int status) ss->start_time.tv_usec = 0L; } - - put_scoreboard_info(child_num, ss); } static void increment_counts(int child_num, request_rec *r) @@ -1330,7 +1308,6 @@ static void increment_counts(int child_num, request_rec *r) long int bs = 0; short_score *ss; - ap_sync_scoreboard_image(); ss = &ap_scoreboard_image->servers[child_num]; if (r->sent_bodyct) @@ -1343,8 +1320,6 @@ static void increment_counts(int child_num, request_rec *r) ss->bytes_served += (unsigned long) bs; ss->my_bytes_served += (unsigned long) bs; ss->conn_bytes += (unsigned long) bs; - - put_scoreboard_info(child_num, ss); } static int find_child_by_pid(int pid) @@ -1368,8 +1343,6 @@ static void reclaim_child_processes(int terminate) int ret; other_child_rec *ocr, *nocr; - ap_sync_scoreboard_image(); - for (tries = terminate ? 4 : 1; tries <= 12; ++tries) { /* don't want to hold up progress any more than * necessary, but we need to allow children a few moments to exit. @@ -2333,7 +2306,6 @@ static void child_main(int child_num_arg) pmutex = ap_make_sub_pool(pchild); /* needs to be done before we switch UIDs so we have permissions */ - reopen_scoreboard(pchild); SAFE_ACCEPT(accept_mutex_child_init(pmutex)); set_group_privs(); @@ -2385,7 +2357,6 @@ static void child_main(int child_num_arg) ap_clear_pool(ptrans); - ap_sync_scoreboard_image(); if (ap_scoreboard_image->global.running_generation != ap_my_generation) { clean_child_exit(0); } @@ -2515,7 +2486,6 @@ static void child_main(int child_num_arg) /* or maybe we missed a signal, you never know on systems * without reliable signals */ - ap_sync_scoreboard_image(); if (ap_scoreboard_image->global.running_generation != ap_my_generation) { clean_child_exit(0); } @@ -2597,7 +2567,6 @@ static void child_main(int child_num_arg) (void) ap_update_child_status(my_child_num, SERVER_BUSY_KEEPALIVE, (request_rec *) NULL); - ap_sync_scoreboard_image(); if (ap_scoreboard_image->global.running_generation != ap_my_generation) { ap_call_close_connection_hook(current_conn); ap_bclose(conn_io); @@ -2763,7 +2732,6 @@ static void perform_idle_server_maintenance(void) last_non_dead = -1; total_non_dead = 0; - ap_sync_scoreboard_image(); for (i = 0; i < ap_daemons_limit; ++i) { int status; @@ -3074,7 +3042,6 @@ static void standalone_main(int argc, char **argv) if (pid >= 0) { process_child_status(pid, status); /* non-fatal death... note that it's gone in the scoreboard. */ - ap_sync_scoreboard_image(); child_slot = find_child_by_pid(pid); Explain2("Reaping child %d slot %d", pid, child_slot); if (child_slot >= 0) { @@ -3165,7 +3132,6 @@ static void standalone_main(int argc, char **argv) */ ++ap_my_generation; ap_scoreboard_image->global.running_generation = ap_my_generation; - update_scoreboard_global(); if (is_graceful) { int i; @@ -3181,7 +3147,6 @@ static void standalone_main(int argc, char **argv) * do it if we're in a SCOREBOARD_FILE because it'll cause * corruption too easily. */ - ap_sync_scoreboard_image(); for (i = 0; i < ap_daemons_limit; ++i) { if (ap_scoreboard_image->servers[i].status != SERVER_DEAD) { ap_scoreboard_image->servers[i].status = SERVER_GRACEFUL; diff --git a/usr.sbin/httpd/src/modules/standard/mod_status.c b/usr.sbin/httpd/src/modules/standard/mod_status.c index 0099117b9f4..f801e61eba9 100644 --- a/usr.sbin/httpd/src/modules/standard/mod_status.c +++ b/usr.sbin/httpd/src/modules/standard/mod_status.c @@ -285,7 +285,6 @@ static int status_handler(request_rec *r) if (r->header_only) return 0; - ap_sync_scoreboard_image(); for (i = 0; i < HARD_SERVER_LIMIT; ++i) { score_record = ap_scoreboard_image->servers[i]; ps_record = ap_scoreboard_image->parent[i]; diff --git a/usr.sbin/httpd/src/support/httpd.exp b/usr.sbin/httpd/src/support/httpd.exp index 53cc88a8803..50ea5a5b7ce 100644 --- a/usr.sbin/httpd/src/support/httpd.exp +++ b/usr.sbin/httpd/src/support/httpd.exp @@ -363,7 +363,6 @@ ap_sub_req_lookup_file ap_sub_req_lookup_uri ap_sub_req_method_uri ap_suexec_enabled -ap_sync_scoreboard_image ap_sys_siglist ap_table_add ap_table_addn |