diff options
author | Graham Leggett <minfrin@apache.org> | 2010-10-20 01:11:58 +0200 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2010-10-20 01:11:58 +0200 |
commit | 47399a26013fa01aa808ca9abd10d4bb00facc3b (patch) | |
tree | 52f484f34225f94b90397284dfc3b38e1130fcbe /modules/generators/mod_status.c | |
parent | Avoid unnecessariy initialisation before we test mod_cgi's handler name. (diff) | |
download | apache2-47399a26013fa01aa808ca9abd10d4bb00facc3b.tar.xz apache2-47399a26013fa01aa808ca9abd10d4bb00facc3b.zip |
Avoid unnecessariy initialisation before we test mod_status's handler name.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1024462 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/generators/mod_status.c')
-rw-r--r-- | modules/generators/mod_status.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 0a44f02c92..ffb07ec8cf 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -187,10 +187,6 @@ static int status_handler(request_rec *r) apr_off_t bytes, my_bytes, conn_bytes; apr_off_t bcount, kbcount; long req_time; -#ifdef HAVE_TIMES - float tick; - int times_per_thread = getpid() != child_pid; -#endif int short_report; int no_table_report; worker_score *ws_record; @@ -199,12 +195,20 @@ static int status_handler(request_rec *r) pid_t *pid_buffer, worker_pid; clock_t tu, ts, tcu, tcs; ap_generation_t mpm_generation, worker_generation; +#ifdef HAVE_TIMES + float tick; + int times_per_thread; +#endif - if (strcmp(r->handler, STATUS_MAGIC_TYPE) && - strcmp(r->handler, "server-status")) { + if (strcmp(r->handler, STATUS_MAGIC_TYPE) && strcmp(r->handler, + "server-status")) { return DECLINED; } +#ifdef HAVE_TIMES + times_per_thread = getpid() != child_pid; +#endif + ap_mpm_query(AP_MPMQ_GENERATION, &mpm_generation); #ifdef HAVE_TIMES |